MSC-13914
BOOSTER SYNTHESIS PROGRAM B

  ELT CHECK,1,710302, 33610
  EOF "                                                                        "
      SUBROUTINE CHECK                                                   CHECK
      COMMON/IDATX/IDATE,ITIME                                           CHECK
      COMMON/HEAD   /TITLES(10)                                          CHECK
      RETURN                                                             CHECK
      ENTRY DATE                                                         CHECK
      WRITE (6,1484) (TITLES(I),I=1,10)                                  CHECK
      RETURN                                                             CHECK
C                                                                        CHECK
 1484 FORMAT(10A6)                                                       MSCC
      END                                                                CHECK
  ELT SYNTH,1,710302, 33612
  EOF "                                                                        "
      SUBROUTINE SYNTH                                                   U1108
C     OVERLAY(TTSS,1,0)                                                  U1108
C     PROGRAM SYNTH                                                      U1108
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      IGO = IFIX(SW(1))                                                  SYNTH
      GO TO (100,200,300), IGO                                           LT002
  100 CALL FRENCH                                                        SYNTH
      CALL VEHDF                                                         SYNTH
      CALL TRAJA                                                         SYNTH
      RETURN                                                             SYNTH
  200 CALL ITER8                                                         SYNTH
      RETURN                                                             SYNTH
  300 CALL ITER8                                                         LT002
      RETURN                                                             LT002
      END                                                                SYNTH
  ELT VEHDF,1,710302, 33615
  EOF "                                                                        "
      SUBROUTINE VEHDF                                                   VEHDF
      REAL NXFOB                                                         VEHDF
      REAL IVACO,IVACB,ISLO,ISLB,IDVEL                                   VEHDF
      DIMENSION IVACO(7),ISLO(7),TFCTRO(7),TFCTRB(4),IVACB(4),ISLB(4)    VEHDF
     1 ,PRNTX(3)                                                         JDA5
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        VEHDF
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                VEHDF
      COMMON/DATA2X/ ALD,FBPAR,IDVEL,ISLB,ISLO,IVACB,IVACO,PERISP,QMAX,  JDA1
     1 QMXS,SFC,SLVOUT,COPIES,SYNIT,TFCTRB,TFCTRO,TOLMU,TOLTW,           JDA5
     2 TRATIO,TWLO,TWLOI,WTOUT,FIRE,BOOTW,VCRUSE                         JDA5
     3 , NXFOB,PRNTX,FSEC                                                VEHDF
     4 ,SOLID,AS,BS,SISP,SINERT,SAE,TSBO                                 JDA5
     6 ,FBFUEL,CA,CB,WFLYX,RT,R1,R3,SFC1,SFC2,SFC3,ALD1,ALD2,ALD3,VFLY1, EMS3
     7 VFLY2,VFLY3                                                       EMS3
      COMMON/FLY/FLYBCK                                                  VEHDF
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/ORBINX/                                                     VEHDF
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     VEHDF
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, VEHDF
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, VEHDF
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, VEHDF
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       VEHDF
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        VEHDF
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                VEHDF
      COMMON/ORBINY/                                                     VEHDF
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     VEHDF
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, VEHDF
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, VEHDF
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, VEHDF
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       VEHDF
      COMMON/XCLVG/CLVG                                                  VEHDF
      COMMON/XDRNG/DRNG                                                  VEHDF
      COMMON/XWPO/WPOREQ,WOREQ,GWREQ                                     JDA1
      COMMON/PO/MPRNT,MPNCH                                              VEHDF
      NAMELIST/DATA2/ALD,FBPAR,IDVEL,ISLB,ISLO,IVACB,IVACO,PERISP,QMAX,  JDA1
     1 QMXS,SFC,SLVOUT,COPIES,SYNIT,TFCTRB,TFCTRO,TOLMU,TOLTW,           JDA5
     2 TRATIO,TWLO,TWLOI,WTOUT,FIRE,BOOTW,VCRUSE                         JDA5
     3 ,NXFOB,PRNTX,FSEC, CLVG, DRNG                                     JDA1
     4 ,SOLID,AS,BS,SISP,SINERT,SAE,TSBO  ,FLYBCK                        JDA5
     5 ,WPOREQ,WOREQ,GWREQ                                               JDA1
     6 ,FBFUEL,CA,CB,WFLYX,RT,R1,R3,SFC1,SFC2,SFC3,ALD1,ALD2,ALD3,VFLY1, EMS3
     7 VFLY2,VFLY3                                                       EMS3
C  ****  READ SYNTHESIS DATA  ****                                       VEHDF
      READ(5,DATA2)                                                      VEHDF
      IF(MPRNT.EQ.1) WRITE(6,DATA2)                                      VEHDF
      SE(1) = IVACB(1)                                                   VEHDF
      SE(2) = IVACO(1)                                                   VEHDF
      SE(3) = ISLB(1)                                                    VEHDF
      SE(4) = ISLO(1)                                                    VEHDF
      SE(5) = FIRE+.1                                                    VEHDF
      SE(6) = BOOTW                                                      VEHDF
      SE(7) = QMXS                                                       VEHDF
      SE(8)=FBPAR                                                        JDA1
      IF(FLYBCK.EQ.3.) SE(8)=0.                                          JDA5
      SE(9)=QMAX                                                         JDA1
      SE(11)= IVACB(2)                                                   VEHDF
      SE(12)= IVACO(2)                                                   VEHDF
      SE(13)= ISLB(2)                                                    VEHDF
      SE(14)= ISLO(2)                                                    VEHDF
      SE(15)= IVACO(5)                                                   VEHDF
      SE(16)= ISLO(5)                                                    VEHDF
      SE(17)= IVACO(6)                                                   VEHDF
      SE(18)= ISLO(6)                                                    VEHDF
      SE(19)=IVACO(7)                                                    VEHDF
      SE(20)=ISLO(7)                                                     VEHDF
      SE(21)=TFCTRO(1)                                                   VEHDF
      SE(22)=TFCTRO(2)                                                   VEHDF
      SE(23)=TFCTRO(5)                                                   VEHDF
      SE(24)=TFCTRO(6)                                                   VEHDF
      SE(25)=TFCTRO(7)                                                   VEHDF
      SE(26)=TFCTRB(1)                                                   VEHDF
      SE(27)=TFCTRB(2)                                                   VEHDF
      SE(29) = IVACB(3)                                                  VEHDF
      SE(30) = IVACO(3)                                                  VEHDF
      SE(31) = ISLB(3)                                                   VEHDF
      SE(32) = ISLO(3)                                                   VEHDF
      SE(33) = IVACB(4)                                                  VEHDF
      SE(34) = IVACO(4)                                                  VEHDF
      SE(35) = ISLB(4)                                                   VEHDF
      SE(36) = ISLO(4)                                                   VEHDF
      SE(37) = TFCTRB(4)                                                 VEHDF
      SE(38) = TFCTRO(4)                                                 VEHDF
      SE(39) = NXFOB                                                     VEHDF
      SW(2) = .5                                                         VEHDF
      SW(4) = SYNIT                                                      VEHDF
      SW(5) = TOLMU                                                      VEHDF
      SW(6) = TRATIO                                                     VEHDF
      SW(7) = PERISP                                                     VEHDF
      SW(9) = CLVG                                                       VEHDF
      SW(11) = ALD                                                       VEHDF
      SW(12) = SFC                                                       VEHDF
      SW(13) = SLVOUT                                                    VEHDF
      SW(15)=0.                                                          JDA1
      SW(14) = VCRUSE                                                    VEHDF
      SW(16) = WTOUT                                                     VEHDF
      SW(17) = TWLO                                                      VEHDF
      SW(18) = TOLTW                                                     VEHDF
      SW(19) = TWLOI                                                     VEHDF
      SV(2) = IDVEL                                                      VEHDF
      SV(36) = 7.1                                                       LT002
      SV(29)=COPIES                                                      JDA5
      DO 15 I = 1,3                                                      VEHDF
   15 SQ(1,I) = PRNTX(I)                                                 VEHDF
      SQ(2,1) = FSEC                                                     VEHDF
      SQ(10,1) = WOREQ                                                   JDA1
      SQ(10,3) = DRNG                                                    EMS3
      SQ(16,1) = GWREQ                                                   JDA1
      SQ(19,1)=0.                                                        JDA1
      SQ(19,2)=0.                                                        JDA1
      IF(FBFUEL.EQ.1.) SQ(19,3) = SW(11)/SW(12) * SW(14)/1.689           EMS3
      SQ(13,1) = WPOREQ                                                  VEHDF
      SQ(19,5) = FLYBCK                                                  VEHDF
      SQ(32,1) = FBFUEL                                                  EMS3
      SQ(32,2) = CA                                                      EMS3
      SQ(32,3) = CB                                                      EMS3
      SQ(32,4) = WFLYX                                                   EMS3
      SQ(32,5) = RT                                                      EMS3
      SQ(33,1) = R1                                                      EMS3
      SQ(33,2) = R3                                                      EMS3
      SQ(33,3) = SFC1                                                    EMS3
      SQ(33,4) = SFC2                                                    EMS3
      SQ(33,5) = SFC3                                                    EMS3
      SQ(34,1) = ALD1                                                    EMS3
      SQ(34,2) = ALD2                                                    EMS3
      SQ(34,3) = ALD3                                                    EMS3
      SQ(34,4) = VFLY1                                                   EMS3
      SQ(34,5) = VFLY2                                                   EMS3
      SQ(35,1) = VFLY3                                                   EMS3
      IF(FBFUEL.EQ.2. .OR. FBFUEL.EQ.3.) SQ(19,3)= SQ(34,5)/1.689 *      EMS3
     1 SQ(34,2) / SQ(33,4)                                               EMS3
      TO27(3) = SE(15)                                                   VEHDF
      TO27(4) = SE(15)                                                   VEHDF
      TB27(3) = (1.-SW(7)) * SE(3)  +  SW(7) * SE(11)                    VEHDF
C      ADJUST   MASS  RATIO FOR ORBITER                                  VEHDF
  400 TO34(3) = EXP( (SV(2) - TB27(3) * 32.174049 * ALOG(TB34(3)  )  ) / VEHDF
     1 (TO27(3) * 32.174049)  )                                          VEHDF
C                                                                        VEHDF
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    VEHDF
      SQ(20,1) = SOLID                                                   VEHDF
      SQ(20,2) = AS                                                      VEHDF
      SQ(20,3) = BS                                                      VEHDF
      SQ(20,4) = SISP                                                    VEHDF
      SQ(20,5)=SINERT                                                    JDA5
      SQ(21,1) = SAE                                                     VEHDF
      SQ(21,2) = TSBO                                                    VEHDF
      IF(SOLID.LE.0.) RETURN                                             VEHDF
      SQ(21,3) = (SOLID/SISP)*TSBO*(AS+.5*BS*TSBO)                       VEHDF
      SQ(21,4) =(AS - 14.69 * SAE  ) * SOLID                             VEHDF
      SQ(21,5)=SINERT*SOLID+SQ(21,3)                                     JDA5
      SQ(22,1) = SQ(21,3) / SOLID                                        VEHDF
      SQ(22,2) = SQ(21,4) / SOLID                                        VEHDF
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    VEHDF
C                                                                        VEHDF
      RETURN                                                             VEHDF
      END                                                                VEHDF
  ELT RANGE,1,710302, 33618
  EOF "                                                                        "
      SUBROUTINE RANGE                                                   RANGE
C                                                                        RANGE
      DIMENSION VSTBL(7), HSTBL(5), HANTBL(7,5), HAATBL(7,5),            RANGE
     2 VAATBL(7,5), VABTBL(7,5), RAATBL(7,5), RABTBL(7,5),               RANGE
     3 VATBL(7), HATBL(7), PSATBL(7,7),                                  RANGE
     4 HARTBL87), PSITBL(4), HRATBL(7,4), HRBTBL(7,4)                    RANGE
C                                                                        RANGE
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
C                                                                        RANGE
      DATA HSTBL/ 150000., 175000., 200000., 225000., 250000./           RANGE
C                                                                        RANGE
      DATA VSTBL/ 7000., 8000., 9000., 10000., 11000., 12000., 13000./   RANGE
C                                                                        RANGE
      DATA HANTBL/ 2.175, 2.240, 2.320, 2.410, 2.505, 2.6075, 2.7125,    RANGE
     2 2.115, 2.145, 2.190, 2.250, 2.325, 2.405, 2.485,                  RANGE
     3 2.055, 2.073, 2.100, 2.125, 2.160, 2.200, 2.240,                  RANGE
     4 2.035, 2.038, 2.042, 2.050, 2.060, 2.080, 2.105,                  RANGE
     5 2.015, 2.020, 2.022, 2.025, 2.030, 2.032, 2.035/                  RANGE
C                                                                        RANGE
      DATA HAATBL/ 195., 200., 200., 197., 193., 187., 175.,             RANGE
     2 150., 183., 203., 215., 220., 220., 220.,                         RANGE
     3 200., 250., 303., 353., 405., 460., 510.,                         RANGE
     4 220., 290., 375., 470., 570., 670., 780.,                         RANGE
     5 235., 320., 415., 520., 640., 790., 880./                         RANGE
C                                                                        RANGE
      DATA VAATBL/ 3.65, 6.00, 8.25, 10.60, 12.90, 15.40, 18.25,         RANGE
     2 1.70, 2.30, 3.20, 4.40, 5.90, 7.55, 9.30,                         RANGE
     3 0.70, 1.15, 1.60, 2.35, 3.25, 4.45, 6.00,                         RANGE
     4 -1.00, -1.40, -1.00, 0.02, 1.70, 2.70, 2.70,                      RANGE
     5 -1.30, -1.80, -1.70, -1.25, -0.70, -0.45, -0.70/                  RANGE
C                                                                        RANGE
      DATA VABTBL/ -122.0,-166.0,-212.0,-260.0,-309.0,-360.0,-416.0,     RANGE
     2 -62.0, -70.0, -103.0, -133.0, -167.0, -202.0, -240.0,             RANGE
     3 -38.0, -47.0, -58.0, -73.0, -92.5, -119.0, -153.0,                RANGE
     4 -6.0, -10.0, -15.0, -22.0, -32.0, -46.0, -67.0,                   RANGE
     5 5.0, 2.5, 0., -2.5, -6.0, -12.5, -22.5/                           RANGE
C                                                                        RANGE
      DATA RAATBL/ 0.05, 0.065, 0.10, 0.18, 0.33, 0.385, 0.40,           RANGE
     2 0.02, 0.08, 0.16, 0.26, 0.39, 0.54, 0.73,                         RANGE
     3 0.07, 0.07, 0.07, 0.11, 0.15, 0.25, 0.52,                         RANGE
     4 -0.05, 0.01, 0.04, 0.055, 0.06, 0.098, 0.201,                     RANGE
     5 0.04, 0.03, 0.01, -0.018, -0.04, -0.05, 0.03/                     RANGE
C                                                                        RANGE
      DATA RABTBL/ 2.3, 2.8, 3.1, 2.8, 2.2, 2.5, 3.4,                    RANGE
     2 3.7, 4.1, 4.2, 4.9, 5.2, 5.55, 5.8,                               RANGE
     3 3.45, 4.85, 6.45, 8.3, 9.8, 10.9, 11.6,                           RANGE
     4 5.2, 5.2, 6.3, 9.0, 11.8, 14.25, 16.8,                            RANGE
     5 4.1, 5.9, 8.0, 10.5, 13.2, 16.1, 19.4/                            RANGE
C                                                                        RANGE
      DATA VATBL/ 7000., 8000., 9000., 10000., 11000., 12000., 13000./   RANGE
C                                                                        RANGE
      DATA HATBL/ 180000., 200000., 220000., 240000., 260000., 280000.,  RANGE
     1 300000./                                                          RANGE
C                                                                        RANGE
      DATA PSATBL/ 90.0, 90.0, 89.0, 85.0, 83.0, 81.0, 79.5,             RANGE
     2 87.0, 80.5, 76.0, 73.5, 72.0, 71.0, 71.0,                         RANGE
     3 81.5, 66.5, 63.0, 62.0, 61.5, 61.5, 62.0,                         RANGE
     4 65.0, 58.5, 55.5, 54.0, 54.5, 56.0, 58.5,                         RANGE
     5 35.0, 32.5, 32.0, 33.0, 35.0, 38.0, 41.5,                         RANGE
     6 17.0, 16.0, 17.0, 19.0, 22.0, 25.5, 30.0,                         RANGE
     7  0.0,  0.0,  1.5,  4.0,  8.0, 13.0, 19.0/                         RANGE
C                                                                        RANGE
      DATA PSITBL/ 0., 45., 60., 75./                                    RANGE
C                                                                        RANGE
      DATA HARTBL/150000., 175000., 200000., 225000.,                    RANGE
     1 250000., 275000., 300000./                                        RANGE
C                                                                        RANGE
      DATA HRATBL/ 7*16.0E-07,                                           RANGE
     1 7.985E-07, 7.950E-07, 7.915E-07, 7.955E-07,                       RANGE
     1 7.994E-07, 8.000E-07, 8.040E-07,                                  RANGE
     2 3.204E-07, 4.100E-07, 4.636E-07, 3.900E-07,                       RANGE
     2 5.176E-07, 5.350E-07, 5.541E-07,                                  RANGE
     3 0.297E-07, 1.150E-07, 1.969E-07, 2.600E-07,                       RANGE
     3 3.131E-07, 3.550E-07, 3.958E-07/                                  RANGE
C                                                                        RANGE
      DATA HRBTBL/ 0., 0.250E-02, 0.475E-02, 0.650E-02,                  RANGE
     A 0.800E-02, 0.950E-02, 1.100E-02,                                  RANGE
     1 0.577E-02, 0.600E-02, 0.992E-02, 1.150E-02,                       RANGE
     1 1.276E-02, 1.400E-02, 1.512E-02,                                  RANGE
     2 0.830E-02, 1.000E-02, 1.152E-02, 1.275E-02,                       RANGE
     2  1.425E-02, 1.525E-02, 1.652E-02,                                 RANGE
     3 0.931E-02, 1.120E-02, 1.271E-02, 1.400E-02,                       RANGE
     3 1.522E-02, 1.630E-02, 1.726E-02/                                  RANGE
C                                                                        RANGE
C     BANK ANGLE DURING ENTRY = PSI = SQ(10,2)                           RANGE
      SQ(10,2) = 0.                                                      RANGE
C                                                                        RANGE
      ISND = IFIX(SQ(19,5)+.1)                                           LT002
      GO TO (100,200,300,400,500), ISND                                  LT002
C                                                                        RANGE
  100 CONTINUE                                                           RANGE
C     DETAILED FLYBACK RANGE CALCULATIONS                                RANGE
      VS = SV(8)                                                         RANGE
      HS = SV(9)                                                         RANGE
      IF(HS.GT.250000.) WRITE(6,1000)                                    RANGE
      IF(HS.GT.250000.) HS = 250000.                                     RANGE
      GAMS = SV(10)                                                      RANGE
      IF(GAMS.GT.14.)  WRITE(6,2000)                                     RANGE
      IF(GAMS.GT.14.) GAMS = 14.                                         RANGE
      DRS = SW(10)                                                       RANGE
C                                                                        RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,HANTBL,HAN)                           RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,HAATBL,HAA)                           RANGE
      HA = HAA*GAMS**HAN + HS                                            RANGE
C                                                                        RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,VAATBL,VAA)                           RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,VABTBL,VAB)                           RANGE
      VA = VAA*GAMS**2. + VAB*GAMS + VS                                  RANGE
C                                                                        RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,RAATBL,RAA)                           RANGE
      CALL TBL2D(VS,HS,VSTBL,HSTBL,RABTBL,RAB)                           RANGE
      RA = RAA*GAMS**2. + RAB*GAMS                                       RANGE
C                                                                        RANGE
      IF(HA.GT.300000.) WRITE(6,3000)                                    RANGE
      IF(HA.GT.300000.) HA = 300000.                                     RANGE
      CALL TBL2D(VA,HA,VATBL,HATBL,PSATBL,PSI)                           RANGE
      IF(PSI.GE.75.0) PSI = 75.0                                         RANGE
      SQ(10,2) = PSI                                                     RANGE
C                                                                        RANGE
      CALL TBL2D(HA,PSI,HARTBL,PSITBL,HRATBL,HRA)                        RANGE
      CALL TBL2D(HA,PSI,HARTBL,PSITBL,HRBTBL,HRB)                        RANGE
      RR = HRA*VA**2. + HRB*VA                                           RANGE
C                                                                        RANGE
      R = 60.*DRS + RA + RR + SQ(10,3)                                   RANGE
C                                                                        RANGE
C     SQ(10,3) IS A FLYBACK ADDITIVE RANGE FACTOR TO ACCOUNT FOR THE     RANGE
C     FINITE TIME REQUIRED TO ACCOMPLISH VARIOUS REENTRY MANEUVERS.      RANGE
C     DRNG IS THE NUMONIC INPUT IN DATA2.                                RANGE
C                                                                        RANGE
      IF(SW(9).NE.1.) GO TO 10                                           RANGE
C                                                                        RANGE
      SW(15) = R                                                         RANGE
C                                                                        RANGE
      RETURN                                                             RANGE
C                                                                        RANGE
C     CORRECT FG RANGE PREDICTION FOR VG CONFIGURATION                   RANGE
   10 SW(15) = R*(0.7230/SW(9))**0.25                                    RANGE
      RETURN                                                             RANGE
C                                                                        RANGE
  200 CONTINUE                                                           RANGE
C     FLYBACK RANGE = FUNCTION OF STAGING Q ONLY                         RANGE
C                                                                        RANGE
C     SPECIAL FLYBACK RANGE COMPUTATION FOR MSC                          RANGE
C     VQ(25,1) = LOG(10) Q STAGE                                         RANGE
      RNG  =  -55.915*VQ(25,1) + 430.0                                   RANGE
C                                                                        RANGE
C     SQ(10,3) IS A FLYBACK ADDITIVE RANGE FACTOR TO ACCOUNT FOR THE     RANGE
C     FINITE TIME REQUIRED TO ACCOMPLISH VARIOUS REENTRY MANEUVERS.      RANGE
C     DRNG IS THE MNEMONIC INPUT IN DATA2.                               RANGE
C     SW(15) = FLYBACK RANGE                                             RANGE
      SW(15) = RNG  +  SQ(10,3)                                          RANGE
C                                                                        RANGE
C                                                                        RANGE
      RETURN                                                             RANGE
C                                                                        RANGE
  300 CONTINUE                                                           RANGE
C     FLYBACK RANGE = CONSTANT = SQ(10,3) INPUT IN DATA2                 RANGE
      SW(15) = SQ(10,3)                                                  RANGE
      RETURN                                                             RANGE
C                                                                        RANGE
  400 CONTINUE                                                           RANGE
C     FLYBACK RANGE = IIP                                                RANGE
C     SW(10) = CENTRAL ANGLE FROM LIFT OFF TO STAGING                    RANGE
C     SQ(12,1) = IIP CENTRAL ANGLE FROM STAGING TO IMPACT = Z(89)        RANGE
C     SQ(10,3) = ADDITIVE RANGE FACTOR (DATA2 INPUT)                     RANGE
      SW(15) = 60.*(SQ(12,1) + SW(10)) + SQ(10,3)                        RANGE
      RETURN                                                             RANGE
C                                                                        RANGE
  500 CONTINUE                                                           LT002
C  ****  FLYBACK TRAJECTORY TO BE NUMERICALLY INTEGRATED  ****           LT002
      SV(35) = 2.1                                                       LT002
      RETURN                                                             LT002
C                                                                        LT002
 1000 FORMAT(74H STAGING ALTITUDE GREATER THAN 250000 FT - FLYBACK RANGE RANGE
     1 EQUATIONS INVALID)                                                RANGE
 2000 FORMAT(68H STAGING GAMMA GREATER THAN 14 DEG - FLYBACK RANGE EQUAT RANGE
     1IONS INVALID)                                                      RANGE
 3000 FORMAT(73H APOGEE ALTITUDE GREATER THAN 300000 FT - FLYBACK RANGE  RANGE
     1EQUATIONS INVALID)                                                 RANGE
      END                                                                RANGE
  ELT SUMOUT,1,710302, 33622
  EOF "                                                                        "
      SUBROUTINE SUMOUT                                                  SUMOUT
      REAL LBODYO,LBODYB                                                 SUMOUT
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        SUMOUT
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                SUMOUT
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        SUMOUT
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                SUMOUT
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/ORBINX/                                                     SUMOUT
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     SUMOUT
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, SUMOUT
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, SUMOUT
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, SUMOUT
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       SUMOUT
      COMMON/ORBINY/                                                     SUMOUT
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     SUMOUT
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, SUMOUT
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, SUMOUT
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, SUMOUT
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       SUMOUT
      COMMON/TAMP/WGROSO,OTTOT,WFUOXO,TBTO,BTTOT                         SUMOUT
      COMMON/SUMVW/WOP,         WABFUB,WFUOXB,WDRYB,WGROSB,WOTHB,        SUMOUT
     1 VFUTKB,VOXTKB,VOTHB,VBODYB,VABFUB,                                SUMOUT
     2 LBODYB,SBODYB,SPLANB,WOVRSB,                                      SUMOUT
     1              WPAYLO,WDRYO,WOTHO,  WABFUO,                         SUMOUT
     2 VFUTKO,VOXTKO,VCARO,VOTHO,VBODYO,                                 SUMOUT
     3 LBODYO,SBODYO,SPLANO,WOVRSO                                       SUMOUT
     4 ,WORBTO,WORBTB,WRTRNO,WRTRNB,WENTRO,WENTRB,WLANDB,WLANDO          SUMOUT
     5 , WCONTO,WCONTB                                                   SUMOUT
      IFIRE = SE(5)                                                      SUMOUT
      SQ(14,3) = SQ(14,2) - SQ(14,1)                                     JDA6
      FRANK = WFUOXO - WOP                                               EMS4
      TWORB = OTTOT/WGROSO                                               SUMOUT
      WDRYT =    WDRYB + WDRYO                                           SUMOUT
      WGROSV =    WGROSB + WGROSO                                        SUMOUT
      VPROPO = VFUTKO + VOXTKO                                           SUMOUT
      VPROPB = VFUTKB + VOXTKB                                           SUMOUT
   30 TVANO = OTTOT/TO36                                                 SUMOUT
      TVAUO = TVANO * SE(38)                                             SUMOUT
      TVANB =  BTTOT/TB36                                                SUMOUT
      TVAUB = TVANB * SE(37)                                             SUMOUT
      TSLNO = TVANO * SE(32)/SE(30)                                      SUMOUT
      TSLNB = TVANB * SE(31) /SE(29)                                     SUMOUT
      TSLUO = TVAUO * SE(36)/SE(34)                                      SUMOUT
      TSLUB = TVAUB * SE(35)/SE(33)                                      SUMOUT
      X = 1.                                                             SUMOUT
      IF(SE(21).EQ.0. .OR.IFIRE.EQ.2)  X = 0.                            SUMOUT
      TVAN = OTTOT * X +  BTTOT                                          SUMOUT
      WDOTN = OTTOT * X /SE(30) +  BTTOT/SE(29)                          SUMOUT
      SPVAN = TVAN/WDOTN                                                 SUMOUT
      TSLN = TSLNO * TO36 * X + TSLNB * TB36                             SUMOUT
      SPSLN = TSLN/WDOTN                                                 SUMOUT
      TVAU = OTTOT * X * SE(38) +  BTTOT * SE(37)                        SUMOUT
      WDOTU = TVAUO * X * TO36 / SE(34) + TVAUB * TB36      / SE(33)     SUMOUT
      SPVAU = TVAU/WDOTU                                                 SUMOUT
      TSLU = TSLUO * TO36 * X + TSLUB * TB36                             SUMOUT
      SPSLU = TSLU/WDOTU                                                 SUMOUT
      WOPT = FRANK + SQ(37,4)                                            EMS4
      WOPTX = WFUOXO + SQ(37,4)                                          EMS4
      WBPTX = WFUOXB + SQ(37,5)                                          EMS4
      NCOPIE=SV(29)+.1                                                   SUMOUT
      DO 900 I=1,NCOPIE                                                  SUMOUT
      WRITE (6,1000)                                                     SUMOUT
      CALL DATE                                                          SUMOUT
      WRITE (6,1005)                                                     SUMOUT
      WRITE (6,1010)                                                     SUMOUT
      WRITE(6,1011) WFUOXB, FRANK                                        SUMOUT
      WRITE (6,1012) SQ(37,5), SQ(37,4)                                  EMS4
      WRITE (6,1015) WBPTX,WOPT                                          EMS4
      WRITE (6,1020)  WOP                                                SUMOUT
      WRITE (6,1025) WBPTX,WOPTX                                         EMS4
      WRITE (6,1022) WABFUB ,WABFUO                                      SUMOUT
      WRITE (6,1030)  WPAYLO                                             SUMOUT
      WRITE (6,1035)  WDRYB,WDRYO ,WDRYT                                 SUMOUT
      WRITE (6,1041) WCONTB,WCONTO                                       SUMOUT
      WRITE (6,1040)  WOTHB,WOTHO                                        SUMOUT
      WRITE (6,1045)  WGROSB,WGROSO,WGROSV                               SUMOUT
      WRITE (6,1170)         WORBTO                                      SUMOUT
      WRITE (6,1175) WRTRNB,WRTRNO                                       SUMOUT
      WRITE (6,1180) WENTRB,WENTRO                                       SUMOUT
      WRITE (6,1185) WLANDB,WLANDO                                       SUMOUT
      WRITE (6,1050)                                                     SUMOUT
      WRITE (6,1055)  VFUTKB,VFUTKO                                      SUMOUT
      WRITE (6,1060)  VOXTKB,VOXTKO                                      SUMOUT
      WRITE (6,1065)  VPROPB,VPROPO                                      SUMOUT
      WRITE (6,1070)  VCARO                                              SUMOUT
      WRITE (6,1075)  VOTHB,VOTHO                                        SUMOUT
      WRITE (6,1077) VBODYB,VBODYO                                       SUMOUT
      WRITE (6,1080)                                                     SUMOUT
      WRITE (6,1085)  LBODYB,LBODYO                                      SUMOUT
      WRITE (6,1090)  SBODYB,SBODYO                                      SUMOUT
      WRITE (6,1095)  SPLANB,SPLANO                                      SUMOUT
      WRITE (6,1096) TB45, TO45                                          EMS4
      WRITE (6,1100)  WOVRSB,WOVRSO                                      SUMOUT
      WRITE (6,1105)                                                     SUMOUT
      WRITE (6,1110) TWORB,SV(13)                                        SUMOUT
      WRITE (6,1111) TB36,TO36                                           SUMOUT
      IF( SE(21)  .EQ.0. .OR.IFIRE.EQ.2) GO TO 200                       SUMOUT
      WRITE (6,1112) TSLNB,TSLUB,TSLNO,TSLUO,TSLN,TSLU                   SUMOUT
      WRITE (6,1113) TVANB,TVAUB,TVANO,TVAUO,TVAN,TVAU                   SUMOUT
      WRITE (6,1115) SE(31) , SE(35) , SE(32) , SE(36) ,SPSLN, SPSLU     SUMOUT
      WRITE (6,1120) SE(29) , SE(33) , SE(30) , SE(34) ,SPVAN,SPVAU      SUMOUT
      GO TO 220                                                          SUMOUT
C     NO CROSSFEED                                                       SUMOUT
  200 WRITE (6,2112) TSLNB,TSLUB,TSLNO,TSLN,TSLU                         SUMOUT
      WRITE (6,2113) TVANB,TVAUB,TVANO,TVAN,TVAU                         SUMOUT
      WRITE (6,2115) SE(31) , SE(35) , SE(32)  ,SPSLN,SPSLU              SUMOUT
      WRITE (6,2120) SE(29) , SE(33) , SE(30) ,SPVAN,SPVAU               SUMOUT
  220 WRITE (6,1125)                                                     SUMOUT
      WRITE (6,1126)     TB34(3),SV(6)                                   SUMOUT
      WRITE(6,1128) SQ(14,1),SQ(14,3),SQ(14,2)                           JDA6
      WRITE (6,1127) SE(9)                                               SUMOUT
      WRITE (6,1130)  SV(12)                                             SUMOUT
      WRITE (6,1135)  SV(8)                                              SUMOUT
      WRITE (6,1140)  SV(9)                                              SUMOUT
      WRITE (6,1145)  SV(10)                                             SUMOUT
      WRITE (6,1150) SQ(14,4)                                            JDA6
      WRITE (6,1155) SQ(14,5)                                            JDA6
      WRITE (6,1160) SQ(15,3)                                            JDA6
      WRITE (6,1165) SQ(15,4)                                            JDA6
      WRITE (6,1195)  SW(15)                                             SUMOUT
C                                                                        SUMOUT
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    SUMOUT
      IF(SQ(20,1).LE.0.) GO TO 900                                       SUMOUT
      WRITE (6,1200) SQ(20,1),SQ(22,1),SQ(20,5),SQ(21,5),SQ(21,1),       SUMOUT
     1 SQ(21,2) ,SQ(20,4),SQ(20,2),SQ(20,3),SQ(22,2)                     SUMOUT
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    SUMOUT
C                                                                        SUMOUT
  900 CONTINUE                                                           SUMOUT
      WRITE (6,1000)                                                     EMS3
      CALL DATE                                                          EMS3
      WRITE (6,3000) SQ(36,1)                                            EMS3
      WRITE (6,3010) SQ(36,2)                                            EMS3
      WRITE (6,3015) SQ(36,3)                                            EMS3
      WRITE (6,3020) SQ(36,4)                                            EMS3
      WRITE (6,3025) SQ(36,5)                                            EMS3
      WRITE (6,3030) Q(62,1)                                             EMS3
      WRITE (6,3035) Q(45,5)                                             EMS3
      WRITE (6,3040) Q(35,5)                                             EMS3
      WRITE (6,3045) SQ(37,1)                                            EMS3
      WRITE (6,3046) SQ(37,2)                                            EMS3
      WRITE (6,3050)                                                     EMS3
      IFLY = SQ(19,5)                                                    EMS3
      GO TO (910,920,930,940,950),IFLY                                   EMS3
  910 WRITE (6,3055) SW(9),SQ(10,2)                                      EMS3
      GO TO 960                                                          EMS3
  920 WRITE (6,3060) SV(12)                                              EMS3
      GO TO 960                                                          EMS3
  930 WRITE (6,3065) SQ(10,3)                                            EMS3
      GO TO 960                                                          EMS3
  940 WRITE (6,3070) SW(10),SQ(12,1)                                     EMS3
      GO TO 960                                                          EMS3
  950 WRITE (6,3075) SV(42)                                              EMS3
      WRITE (6,3080) VQ(33,3)                                            EMS3
      WRITE (6,3085) VQ(34,3)                                            EMS3
      WRITE (6,3090) Z(95)                                               EMS3
      WRITE (6,3095) Z(8)                                                EMS3
      WRITE (6,3100) Z(5)                                                EMS3
      WRITE (6,3105) Z(6)                                                EMS3
      WRITE (6,3110) Z(94)                                               EMS3
  960 IFUL = SQ(32,1)                                                    EMS3
      GO TO (965,970,975),IFUL                                           EMS3
  965 WRITE (6,3115) SW(15)                                              EMS3
      WRITE (6,3120) SW(12)                                              EMS3
      WRITE (6,3125) SW(11)                                              EMS3
      WRITE (6,3130) SW(14)                                              EMS3
      WRITE (6,3135) SQ(10,3)                                            EMS3
      WRITE (6,3140) SQ(32,4)                                            EMS3
      W2 = WABFUB - SQ(32,4)                                             EMS3
      WRITE (6,3145) W2                                                  EMS3
      WRITE (6,3150) WABFUB                                              EMS3
      WRITE (6,3155) SCB(214)                                            EMS3
      GO TO 980                                                          EMS3
  970 WRITE (6,3160) SW(15)                                              EMS3
      WRITE (6,3175) SQ(32,5)                                            EMS3
      WRITE (6,3165) SQ(32,2)                                            EMS3
      WRITE (6,3180) SQ(33,1)                                            EMS3
      WRITE (6,3215) SQ(35,2)                                            EMS3
      WRITE (6,3190) SQ(33,4)                                            EMS3
      WRITE (6,3195) SQ(34,2)                                            EMS3
      WRITE (6,3200) SQ(34,5)                                            EMS3
      WRITE (6,3205) SQ(35,5)                                            EMS3
      WRITE (6,3220) SQ(35,3)                                            EMS3
      WRITE (6,3170) SQ(32,3)                                            EMS3
      WRITE (6,3185) SQ(33,2)                                            EMS3
      WRITE (6,3225) SQ(35,4)                                            EMS3
      WRITE (6,3135) SQ(10,3)                                            EMS3
      WRITE (6,3210) SQ(32,4)                                            EMS3
      WRITE (6,3150) WABFUB                                              EMS3
      WRITE (6,3155) SCB(214)                                            EMS3
      GO TO 980                                                          EMS3
  975 WRITE (6,3230) SW(15)                                              EMS3
      WRITE (6,3175) SQ(32,5)                                            EMS3
      WRITE (6,3235) SQ(33,3)                                            EMS3
      WRITE (6,3245) SQ(34,1)                                            EMS3
      WRITE (6,3255) SQ(34,4)                                            EMS3
      WRITE (6,3180) SQ(33,1)                                            EMS3
      WRITE (6,3215) SQ(35,2)                                            EMS3
      WRITE (6,3190) SQ(33,4)                                            EMS3
      WRITE (6,3195) SQ(34,2)                                            EMS3
      WRITE (6,3200) SQ(34,5)                                            EMS3
      WRITE (6,3205) SQ(35,5)                                            EMS3
      WRITE (6,3220) SQ(35,3)                                            EMS3
      WRITE (6,3240) SQ(33,5)                                            EMS3
      WRITE (6,3250) SQ(34,3)                                            EMS3
      WRITE (6,3260) SQ(35,1)                                            EMS3
      WRITE (6,3185) SQ(33,2)                                            EMS3
      WRITE (6,3225) SQ(35,4)                                            EMS3
      WRITE (6,3135) SQ(10,3)                                            EMS3
      WRITE (6,3210) SQ(32,4)                                            EMS3
      WRITE (6,3150) WABFUB                                              EMS3
      WRITE (6,3155) SCB(214)                                            EMS3
  980 CONTINUE                                                           EMS3
      RETURN                                                             SUMOUT
C                                                                        SUMOUT
 1000 FORMAT(1H1,25X,31HSPACE SHUTTLE SYNTHESIS SUMMARY)                 SUMOUT
 1005 FORMAT (37X,7HBOOSTER11X,7HORBITER11X,7HVEHICLE/)                  SUMOUT
 1010 FORMAT (12H WEIGHT (LB))                                           SUMOUT
 1011 FORMAT(32H     PROPELLANT, ASCENT LESS FPRF12.0, F18.0)            SUMOUT
 1012 FORMAT (27H     PROPELLANT,ASCENT FPR,F17.0,F18.0)                 EMS4
 1015 FORMAT(30H     PROPELLANT, ASCENT TOTAL F14.0,2F18.0)              SUMOUT
 1020 FORMAT (36H     PROPELLANT, ORBIT MANEUVER     8X,2F18.0)          SUMOUT
 1022 FORMAT (26H     FLYBACK FUEL                  3F18.0)              SUMOUT
 1025 FORMAT (26H     PROPELLANT, TOTAL             3F18.0)              SUMOUT
 1030 FORMAT (26H     PAYLOAD                       18X,2F18.0)          SUMOUT
 1035 FORMAT(26H     STRUCTURE                     3F18.0)               SUMOUT
 1040 FORMAT (26H     OTHER                         3F18.0)              SUMOUT
 1041 FORMAT (26H     CONTINGENCY                   3F18.0)              SUMOUT
 1045 FORMAT (26H     TOTAL                         3F18.0)              SUMOUT
 1050 FORMAT (13H0VOLUME (FT3))                                          SUMOUT
 1055 FORMAT (26H     FUEL TANK                     3F18.0)              SUMOUT
 1060 FORMAT (26H     OXIDIZER TANK                 3F18.0)              SUMOUT
 1065 FORMAT (26H     PROPELLANT TANKS              3F18.0)              SUMOUT
 1070 FORMAT (26H     PAYLOAD                       18X,2F18.0)          SUMOUT
 1075 FORMAT (26H     OTHER                         3F18.0)              SUMOUT
 1077 FORMAT (26H     TOTAL                         3F18.0)              SUMOUT
 1080 FORMAT (9H GEOMETRY)                                               EMS4
 1085 FORMAT (26H     LENGTH (FT)                   3F18.1)              SUMOUT
 1090 FORMAT (27H     BODY WETTED AREA (FT2)        F17.1,2F18.1)        SUMOUT
 1095 FORMAT (29H     BODY PLANFORM AREA (FT2)      F15.1,2F18.1)        SUMOUT
 1096 FORMAT (33H     THEORETICAL WING AREA (FT2) F11.1,F18.1)           EMS4
 1100 FORMAT (23H     WING LOADING (PSF) F21.1,F18.1)                    EMS4
 1105 FORMAT (11H PROPULSION)                                            EMS4
 1110 FORMAT (26H     THRUST-TO-WEIGHT              18X,2F18.5)          SUMOUT
 1111 FORMAT (26H     NO. OF ENGINES                2F18.0)              SUMOUT
 1112 FORMAT (26H     SL THRUST/ENG NOM/UR ,2(F10.0,1H/,F7.0) ,          SUMOUT
     1 F9.0,1H/,F8.0)                                                    SUMOUT
 1113 FORMAT (26H     VAC THRUST/ENG NOM/UR,2(F10.0,1H/,F7.0) ,          SUMOUT
     1 F9.0,1H/,F8.0)                                                    SUMOUT
 1115 FORMAT (26H     SL ISP NOM/UR        ,3(F12.1,1H/,F5.1) )          SUMOUT
 1120 FORMAT (26H     VAC ISP NOM/UR        ,3(F12.1,1H/,F5.1) )         SUMOUT
 1125 FORMAT (11H0TRAJECTORY )                                           SUMOUT
 1126 FORMAT (26H     MASS RATIO                    2F18.5)              SUMOUT
 1127 FORMAT (35H     MAXIMUM DYNAMIC PRESSURE (PSF)27X,F18.1)           SUMOUT
 1128 FORMAT(34H     CHARACTERISTIC VELOCITY (FPS)3X,F7.0,2F18.0)        SUMOUT
 1130 FORMAT (35H     STAGING DYNAMIC PRESSURE (PSF)27X,2F18.0)          SUMOUT
 1135 FORMAT (38H     STAGING VELOCITY (RELATIVE) (FPS)24X,F18.0)        SUMOUT
 1140 FORMAT (35H     STAGING ALTITUDE (FT)         27X,F18.0)           SUMOUT
 1145 FORMAT (47H     STAGING FLIGHT PATH ANGLE (RELATIVE) (DEG)15X,     SUMOUT
     1F18.3)                                                             SUMOUT
 1150 FORMAT (40H     INJECTION VELOCITY (INERTIAL) (FPS)4X,F18.0)       SUMOUT
 1155 FORMAT (35H     INJECTION ALTITUDE (FT)        9X,2F18.0)          SUMOUT
 1160 FORMAT (49H     INJECTION FLIGHT PATH ANGLE (INERTIAL) (DEG)F13.3) SUMOUT
 1165 FORMAT (35H     INJECTION INCLINATION (DEG)    9X,2F18.2)          SUMOUT
 1170 FORMAT (26H0    IN ORBIT                      18X,2F18.0)          SUMOUT
 1175 FORMAT (26H     RETURN CONDITION              2F18.0)              SUMOUT
 1180 FORMAT (26H     ENTRY                         2F18.0)              SUMOUT
 1185 FORMAT (26H     LANDING                       2F18.0)              SUMOUT
 1195 FORMAT (26H0FLYBACK RANGE (N MI)               F18.1)              SUMOUT
 1200 FORMAT (22H0SOLID AUGMENTATION   ,F4.0,7H SOLIDS,2X,15HPROPELLANT  SUMOUT
     1WT.= F8.0,2X,10HINERT WT.= F8.0/                                   SUMOUT
     2                               12X,11HTOTAL WT. =F9.0,5X,11HEXIT A SUMOUT
     3REA = F6.0,5X,11HBURN TIME =F5.0/                                  SUMOUT
     4                                12X,5HISP =F7.2, 5X,16HVAC THRUST/ SUMOUT
     5ENG= F8.0,4H + (,F7.0,9H * TIME )  / 12X,15HSL THRUST/ENG = F9.0)  SUMOUT
 2112 FORMAT (26H     SL THRUST/ENG NOM/UR  ,                            SUMOUT
     1 F10.0,1H/,F7.0,F10.0,1H/,7X, F9.0,1H/,F8.0)                       SUMOUT
 2113 FORMAT (26H     VAC THRUST/ENG NOM/UR  ,                           SUMOUT
     1 F10.0,1H/,F7.0,F10.0,1H/,7X, F9.0,1H/,F8.0)                       SUMOUT
 2115 FORMAT (26H     SL ISP NOM/UR                                      SUMOUT
     1 F12.1,1H/,F5.1,F12.1,1H/,5X,F12.1,1H/,F5.1)                       SUMOUT
 2120 FORMAT (26H     VAC ISP NOM/UR                                     SUMOUT
     1 F12.1,1H/,F5.1,F12.1,1H/,5X,F12.1,1H/,F5.1)                       SUMOUT
 3000 FORMAT (34H0DRAG LOSS AT STAGING            = F10.2)               EMS3
 3010 FORMAT (34H GRAVITY LOSS AT STAGING         = F10.2)               EMS3
 3015 FORMAT (34H DRAG LOSS AT INJECTION          = F10.2)               EMS3
 3020 FORMAT (34H GRAVITY LOSS AT INJECTION       = F10.2)               EMS3
 3025 FORMAT (34H MISALIGNMENT LOSS AT INJECTION = F10.2)                EMS3
 3030 FORMAT (11H0PITX     = E16.7)                                      EMS3
 3035 FORMAT (11H SALP(5)  = E16.7)                                      EMS3
 3040 FORMAT (11H PSIDT(5) = E16.7)                                      EMS3
 3045 FORMAT (30H BOOSTER BURN TIME (SEC. 2)  = F7.2 )                   EMS3
 3046 FORMAT (33H ORBITER BURN TIME (SEC. 5,6,7) = F7.2 )                EMS3
 3050 FORMAT ( 9H0FLYBACK )                                              EMS3
 3055 FORMAT (24H DETAILED RANGE, CLVG = E16.7,5X,12HBANK ANGLE = F7.2 ) EMS3
 3060 FORMAT (27H F(Q STAGE), Q AT STAGING = F10.3)                      EMS3
 3065 FORMAT (17H CONSTANT, DRNG = F10.3)                                EMS3
 3070 FORMAT (22H IIP, CENTRAL ANGLE = F8.2,5X,5H IIP= F8.2)             EMS3
 3075 FORMAT (38H NUMERICAL INTEGRATION, MAX. LOADING = F7.3)            EMS3
 3080 FORMAT (5X,6HTLAT = F8.3)                                          EMS3
 3085 FORMAT (5X,6HTLNG = F8.3)                                          EMS3
 3090 FORMAT (5X15HSURFACE RANGE = F9.3)                                 EMS3
 3095 FORMAT (5X10HALTITUDE = F10.1)                                     EMS3
 3100 FORMAT (5X 10HLATITUDE = F8.3)                                     EMS3
 3105 FORMAT (5X,11HLONGITUDE = F8.3)                                    EMS3
 3110 FORMAT (5X,15HAZIMUTH DIFF. = F8.3)                                EMS3
 3115 FORMAT (16H0CRUISE, RANGE = F8.2)                                  EMS3
 3120 FORMAT (5X,5HSFC = F9.4)                                           EMS3
 3125 FORMAT (5X,5HL/D = F9.4)                                           EMS3
 3130 FORMAT (5X,17HCRUISE VELOCITY = F9.2)                              EMS3
 3135 FORMAT (5X,6HDRNG = F9.2)                                          EMS3
 3140 FORMAT (5X,7HWFLYX = F9.2)                                         EMS3
 3145 FORMAT (5X,13HCRUISE FUEL = F10.2)                                 EMS3
 3150 FORMAT (5X,14HFLYBACK FUEL = F10.2)                                EMS3
 3155 FORMAT (5X,10H C(214) =   F9.5)                                    EMS3
 3160 FORMAT (27H0PERCENTAGE WEIGHT, RANGE = F8.2)                       EMS3
 3165 FORMAT (5X,5HCA = F9.4)                                            EMS3
 3170 FORMAT (5X,5HCB = F9.4)                                            EMS3
 3175 FORMAT (5X,5HRT = F9.2)                                            EMS3
 3180 FORMAT (5X,5HR1 = F9.2)                                            EMS3
 3185 FORMAT (5X,5HR3 = F9.2)                                            EMS3
 3190 FORMAT (5X,5HSFC2=F9.4)                                            EMS3
 3195 FORMAT (5X,5HALD2=F9.4)                                            EMS3
 3200 FORMAT (5X,6HVFLY2=F9.4)                                           EMS3
 3205 FORMAT (5X,5HR2 = F9.2)                                            EMS3
 3210 FORMAT (5X,6HWFLYX= F9.2)                                          EMS3
 3215 FORMAT (5X20HIDLE DESCENT FUEL = F9.2)                             EMS3
 3220 FORMAT (5X20HCRUISE FUEL WEIGHT = F10.2)                           EMS3
 3225 FORMAT (5X,27HFINAL DESCENT FUEL WEIGHT = F9.2)                    EMS3
 3230 FORMAT (17H0BREGUET, RANGE = F9.2)                                 EMS3
 3235 FORMAT (5X,7HSFC1 = F9.4)                                          EMS3
 3240 FORMAT (5X,7HSFC3 = F9.4)                                          EMS3
 3245 FORMAT (5X,7HALD1 = F9.4)                                          EMS3
 3250 FORMAT (5X,7HALD3 = F9.4)                                          EMS3
 3255 FORMAT (5X,7HVFLY1= F9.4)                                          EMS3
 3260 FORMAT (5X,7HVFLY3= F9.4)                                          EMS3
      END                                                                SUMOUT
  ELT ITER8,1,710302, 33624
  EOF "                                                                        "
      SUBROUTINE ITER8                                                   ITER8
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        ITER8
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                ITER8
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        ITER8
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                ITER8
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/ORBINX/                                                     ITER8
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     ITER8
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, ITER8
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, ITER8
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, ITER8
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       ITER8
      COMMON/ORBINY/                                                     ITER8
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     ITER8
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, ITER8
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, ITER8
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, ITER8
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       ITER8
C     SW(2) = 2 FOR CONVERGED RUN                                        ITER8
C     SW(2)=1. FOR LAST PASS                                             ITER8
C     SW(2) =.5 FOR ITERATION                                            ITER8
      IF(SE(39) .NE. 0.) SV(6) = (SV(7) + SE(40) ) / SV(4)               ITER8
      TOLER = ABS( TO34(3) - SV(6) ) / SV(6)                             ITER8
      WRITE (6,1005) SV(6),TO34(3), SW(3),SW(5),TOLER                    ITER8
      IF(ABS(SW(1)-3.1).LT..5) GO TO 500                                 LT002
      IF(SW(2).EQ.1.) GO TO 400                                          ITER8
      SW(2) = .5                                                         ITER8
      IF(SW(3).LE.SW(4)) GO TO 70                                        ITER8
      SW(2) = 1.                                                         ITER8
      SV(43) = 2.1                                                       LT002
      WRITE (6,1020) SW(3)                                               ITER8
   70 IF( TOLER .LT. SW(5) .AND. SW(3) .GE. 2.) GO TO 10                 LT002
      GO TO 11                                                           LT002
   10 SW(2) = 1.                                                         LT002
      SV(43) = 2.1                                                       LT002
   11 TO34(3) = SV(6)                                                    LT002
      CALL RANGE                                                         LT002
      RETURN                                                             ITER8
  400 SW(2) = 2.                                                         ITER8
      IF(ABS(SQ(19,5)-5.).GE..5) GO TO 500                               LT002
      SV(43) = 3.1                                                       LT002
      CALL RANGE                                                         LT002
      RETURN                                                             LT002
  500 IF( TOLER .GT. SW(5) ) WRITE(6,1000) SV(6),TO34(3),SW(5),TOLER     LT002
      IF(SW(3).GT.SW(4)) WRITE(6,1021) SW(3),SW(5),TOLER                 ITER8
      CALL SUMOUT                                                        ITER8
      RETURN                                                             ITER8
 1000 FORMAT (/26H FAILED TO CONVERGE - MU = 2E16.8,                     ITER8
     1 5X,13H INPUT TOL = F8.5,5X,7H TOL = F9.6)                         ITER8
 1005 FORMAT (/5X,10HGTSM MU = F10.6,5X,11HWTVOL MU = F10.6,F4.0,        ITER8
     1 5X,13H INPUT TOL = F8.5,5X,7H TOL = F9.6)                         ITER8
 1020 FORMAT (//31H  ITERATION COUNTER EXCEEDED = F4.0//)                ITER8
 1021 FORMAT (//31H  ITERATION COUNTER EXCEEDED = F4.0,                  ITER8
     1 5X,13H INPUT TOL = F8.5,5X,7H TOL = F9.6)                         ITER8
      END                                                                ITER8
  ELT TRAJC,1,710302, 33626
  EOF "                                                                        "
      SUBROUTINE TRAJC                                                   TRAJC
      REAL                                                               TRAJC
     1 LAT,   LNG,   ITT1,  ITT2,  ITT3,  LAM,   MULT,  JETW,  LAMC,     TRAJC
     2 LAMDT                                                             TRAJC
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   JDA6
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  JDA6
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        JDA6
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  JDA6
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     JDA6
     5 PS(15)                                                            JDA6
      DIMENSION                                                          TRAJC
     1 TWD11(15), TWD12(15), TWD13(15), AREF1(15), AREF2(15), AREF3(15), LT002
     2 STEP(15),  TOL1(15),  TOL2(15),  TOL3(15),  TOL4(15),  TOL5(15),  LT002
     3 TOL6(15),  TOL7(15),  HTL1(15),  HTL2(15),  HTL3(15),  HTL4(15),  LT002
     4 HTL5(15),  HTL6(15),  HTL7(15),  STGC(15),  STGV(15),  STGT(15),  LT002
     5 STGD(15),  JETW(15),  ATMC(15),  AC1(15),   AC2(15),   AC3(15),   LT002
     6 TWC(15),   SIGC(15),  ALPC(15),  LAMC(15),  PSIDT(15), SIGDT(15), LT002
     7 ALPDT(15), LAMDT(15), HMIN(15),  HCOEF(15), BCKT(15),  BCKTT(15), LT002
     8 SPSI(15),  SSIG(15),  SALP(15),  SLAM(15),  XKA1(1,1), XKA2(2,5), LT002
     9 XKA3(2,5), TWD1(15),  TWD2(15),  TWD3(15),  TWD4(15),  TWD5(2),   LT002
     1 TWD6(15),  TWD10(15), GDOT(15),  XOUT(15),  CVC1(4),   CVC2(4),   LT002
     2 CVC3(4),   CVN1(4),   CVN2(4),   CVN3(4),   ECC1(4),   ECC2(4),   LT002
     3 ECC3(4),   ECN1(4),   ECN2(4),   ECN3(4),   DCV1(4),   DCV2(4),   LT002
     4 DCV3(4),   CVM1(4),   CVM2(4),   CVM3(4),   CVL1(4),   CVL2(4),   LT002
     5 CVL3(4),   ECT1(4),   ECT2(4),   ECT3(4),   EC1(4),    EC2(4),    LT002
     6 EC3(4),    GIS(4),    ITT1(4),   ITT2(4),   ITT3(4),   CRGF(4),   LT002
     7 TLAT(4),   TLNG(4),   TOL8(15),  HTL8(15),  ORB(15),   GMC1(15),  LT002
     8 GMC2(15),  GMC3(15),  GMC4(15),  XKPT(4),   PITX(15),  PSEC(15),  LT002
     9 PTME(15),  PRIF(15),  TWD14(15), VSET(15),  VINC(15),  WOUT(15),  LT002
     1 RDALT(4)                                                          LT002
      DIMENSION IVACO(7),ISLO(7),TFCTRO(7),TFCTRB(4),IVACB(4),ISLB(4)    TRAJC
     1 ,PRNTX(3)                                                         JDA5
      COMMON/DATAX/ HANM,HPNM,TRANOM ,                                   JDA6
     1 RAD,   VEL,   GAM,   AZM,   LAT,   LNG,   WGH,   ALT0,  SEC,      TRAJC
     2 PLD,   CVC1,  CVC2,  CVC3,  CVN1,  CVN2,  CVN3,  ECC1,  ECC2,     TRAJC
     3 ECC3,  ECN1,  ECN2,  ECN3,  DCV1,  DCV2,  DCV3,  CVM1,  CVM2,     TRAJC
     4 CVM3,  CVL1,  CVL2,  CVL3,  ECT1,  ECT2,  ECT3,  G0,    CK,       TRAJC
     5 WE,    D2,    D3,    D4,    AGQ,   ATQ,   P0,    CNV1,  CNV2,     TRAJC
     6 CNV3,  ALTQ,  STPF,  A, B, RDALT,  T0,    EC1,   EC2,   EC3,      TRAJC
     7 GIS,   ZOUT,  ITT1,  ITT2,  ITT3,  PSI,   SIG,   ALP,   LAM,      TRAJC
     8 MULT,  VELQ,  PRNT,  PSIF,  CRGF,  TLAT,  TLNG,  ALTF,  AZMF,     TRAJC
     9 TWE,   TWD11, TWD12, TWD13, AREF1, AREF2, AREF3, STEP,  TOL1,     TRAJC
     1 TOL2,  TOL3,  TOL4,  TOL5,  TOL6,  TOL7,  HTL1,  HTL2,  HTL3,     TRAJC
     2 HTL4,  HTL5,  HTL6,  HTL7,  STGC,  STGV,  STGT,  STGD,  JETW,     TRAJC
     3 ATMC,  AC1,   AC2,   AC3,   TWC,   SIGC,  ALPC,  LAMC,  PSIDT,    TRAJC
     4 SIGDT, ALPDT, LAMDT, HMIN,  HCOEF, BCKT,  BCKTT, SPSI,  SSIG,     TRAJC
     5 SALP,  SLAM,  YOUT,  CNV4,  XKA0,  XKA1,  VSET,  VINC,  WOUT,     TRAJC
     6 XKA2,  XKA3,  RFCN,  AZMI,  GTIP,  TWD1,  TWD2,  TWD3,  TWD4,     TRAJC
     7 TWD5,  TWD6,  TWD14, PRIF,  PTME,  TWD10, VGAI,  GDOT,  XOUT,     TRAJC
     8 TOL8,  HTL8,  ORB,   GMC1,  GMC2,  GMC3,  GMC4,  XKPT,  PITX,     TRAJC
     9 PSEC                                                              TRAJC
      COMMON/DATA2X/ ALD,FBPAR,IDVEL,ISLB,ISLO,IVACB,IVACO,PERISP,QMAX,  JDA1
     1 QMXS,SFC,SLVOUT,COPIES,SYNIT,TFCTRB,TFCTRO,TOLMU,TOLTW,           JDA5
     2 TRATIO,TWLO,TWLOI,WTOUT,FIRE,BOOTW,VCRUSE                         JDA5
     3 , NXFOB,PRNTX,FSEC                                                TRAJC
     4 ,SOLID,AS,BS,SISP,SINERT,SAE,TSBO                                 JDA5
     6 ,FBFUEL,CA,CB,WFLYX,RT,R1,R3,SFC1,SFC2,SFC3,ALD1,ALD2,ALD3,VFLY1, EMS3
     7 VFLY2,VFLY3                                                       EMS3
      RFCN = 7.                                                          TRAJC
      CVC1(1)=62.                                                        TRAJC
      CVN1(1)= 201.                                                      TRAJC
      DCV1(1)=.01                                                        TRAJC
      CVN1(2)= 5.                                                        TRAJC
      ECC1(2)=8.                                                         TRAJC
      ECC2(2)=42.                                                        TRAJC
      ECN1(1)= 3.                                                        TRAJC
      ECN1(2)= 7.                                                        TRAJC
      ECN2(2)=7.                                                         TRAJC
      GIS (1)=1.                                                         TRAJC
      GIS (2)=4.                                                         TRAJC
      IF(SEC.LT.7.) SEC = 7.                                             LT002
      ALPC(1)=8.                                                         TRAJC
      ALPC(2)=8.                                                         TRAJC
      ALPC(3)=1.                                                         TRAJC
      ALPC(4)=1.                                                         TRAJC
      SALP(7) = 0.                                                       TRAJC
      TWC (1)=6.                                                         TRAJC
      TWC(2)=6.                                                          TRAJC
      TWC (3)=0.                                                         TRAJC
      TWC(4)=0.                                                          TRAJC
      TWC (5)=6.                                                         TRAJC
      TWC(6)=6.                                                          TRAJC
      TWC(7)=6.                                                          TRAJC
      STGC(2)=7.                                                         TRAJC
      STGC(3)=0.                                                         TRAJC
      STGC(4)=0.                                                         TRAJC
      STGC(5)=0.                                                         TRAJC
      STGC(7)=41.                                                        TRAJC
      STGT(2)=1.                                                         TRAJC
      STGT(3)=.001                                                       TRAJC
      STGT(4)=.001                                                       TRAJC
      STGT(5)=.001                                                       TRAJC
      STGT(7)=1.                                                         TRAJC
      STGD(2)=-1.                                                        TRAJC
      STGD(3)=1.                                                         TRAJC
      STGD(4)=1.                                                         TRAJC
      STGD(5)=1.                                                         TRAJC
      STGD(7)=1.                                                         TRAJC
      PLD = 0.                                                           TRAJC
      SQ(3,1)= 0.                                                        JDA6
C                                                                        JDA6
C       OPTION FOR TARGETING ORBITER TO APOGEE,PERIGEE, TRUE ANOMALY     JDA6
C                                                                        JDA6
      IF( HANM.LE.0.) GO TO 1                                            JDA6
      IF(ORB(7).LT.1.) ORB(7)=1.                                         JDA6
      ECC1(2)=101.                                                       JDA6
      ECC2(2)=102.                                                       JDA6
      STGC(7)=103.                                                       JDA6
      EC1(2)=0.                                                          JDA6
      EC2(2)=0.                                                          JDA6
      STGV(7)=0.                                                         JDA6
      SQ(3,1) = HANM * CNV3                                              JDA6
      SQ(3,2) = HPNM * CNV3                                              JDA6
      SQ(3,3) = TRANOM/CNV2                                              JDA6
      SQ(3,4) = COS(SQ(3,3))                                             JDA6
      SQ(3,5) = SIN(SQ(3,3))                                             JDA6
    1 CONTINUE                                                           JDA6
C       OPTION FOR TARGETING ORBITER TO APOGEE,PERIGEE, TRUE ANOMALY     JDA6
C                                                                        JDA6
C                                                                        TRAJC
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    TRAJC
      IF(SOLID.LE.0.) RETURN                                             TRAJC
      STGV(1) = TSBO                                                     TRAJC
      STGC(1) = 0.                                                       TRAJC
      STGD(1) = 1.                                                       TRAJC
      STGT(1) = .001                                                     TRAJC
      JETW(1)= SINERT * SOLID                                            JDA5
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    TRAJC
C                                                                        TRAJC
      RETURN                                                             TRAJC
      END                                                                TRAJC
  ELT READY,1,710302, 33628
  EOF "                                                                        "
      SUBROUTINE READY                                                   READY
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL NENGS
      REAL KIN                                                           READY
      COMMON/PO/MPRNT,MPNCH                                              READY
C ***  READY   ***                                                       READY
C                                                                        READY
C   READY  - SETS UP FOR AND CALLS REDATA                                READY
C                                                                        READY
                                                                         READY
      COMMON/HEAD   /TITLES(10)                                          READY
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
C                                                                        WDH1
C                                                                        WDH1
C     NAMELIST TO  READ IN DATA                                          READY
C                                                                        READY
      NAMELIST/DATA3/                                                    WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C       ,CBBODY  ,CFUEL   ,    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF     ,FXWOVS  ,    WDH3
     4ISP     ,ITPS    ,K       ,KIN     ,LF      ,MR      ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL,VBODY,WGROSS                                                MSCC
C                                                                        READY
C     NAMELIST TO PRINT OUT INPUT DATA                                   READY
C                                                                        READY
C     NAMELIST TO PUNCH OUT INPUT DATA                                   READY
C                                                                        READY
      NAMELIST/PRNTX/                                                    WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C       ,CBBODY  ,CFUEL   ,    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2           ,FXWOVS  ,    WDH3
     4ISP     ,ITPS    ,K       ,KIN     ,LF      ,MR      ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
C                                                                        READY
C                                                                        READY
 5000 FORMAT(10A6)                                                       MSCC
 1100 READ(5,5000) TITLES                                                MSCC
      READ(5,DATA3)                                                      MSCC
      IF(MPRNT.EQ.1) WRITE (6,PRNTX)                                     READY
      IF(MPNCH.NE.1) RETURN                                              READY
      WRITE (8,PRNTX)                                                    READY
      RETURN                                                             READY
      END                                                                READY
  ELT FRENCH,1,710302, 33630
  EOF "                                                                        "
      SUBROUTINE FRENCH                                                  FRENCH
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL NENGS
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        FRENCH
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                FRENCH
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        FRENCH
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                FRENCH
      COMMON/PO/MPRNT,MPNCH                                              FRENCH
      COMMON/ORBINX/                                                     FRENCH
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     FRENCH
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, FRENCH
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, FRENCH
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, FRENCH
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       FRENCH
      COMMON/ORBINY/                                                     FRENCH
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     FRENCH
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, FRENCH
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, FRENCH
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, FRENCH
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       FRENCH
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  FRENCH
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
C                                                                        FRENCH
C     JO = 0, USE STORED DATA ,NO CHANGES FROM PRECEEDING CASE OF A      FRENCH
C             MULTIPLE RUN                                               FRENCH
C     JO = 1, READ ORBITER INPUT DATA                                    FRENCH
C     JO = 2, READ CHANGES TO ORBITER INPUT FOR A CASE OF A MULTIPLE RUN FRENCH
C     JB = 0, USE STORED DATA ,NO CHANGES FROM PRECEEDING CASE OF A      FRENCH
C             MULTIPLE RUN                                               FRENCH
C     JB = 1, READ BOOSTER INPUT DATA                                    FRENCH
C     JB = 2, READ CHANGES TO BOOSTER INPUT FOR A CASE OF A MULTIPLE RUN FRENCH
C                                                                        FRENCH
C     MPRNTO = 0, NO PRINT OUT OF INPUT   ORBITER DATA                   FRENCH
C     MPRNTO = 1, FOR PRINT OUT OF INPUT  ORBITER DATA                   FRENCH
C     MPRNTB = 0, NO PRINT OUT OF INPUT   BOOSTER DATA                   FRENCH
C     MPRNTB = 1, FOR PRINT OUT OF INPUT  BOOSTER DATA                   FRENCH
C     MPNCHO = 0, NO PUNCH OUT OF INPUT ORBITER DATA                     FRENCH
C     MPNCHO = 1, FOR PUNCH OUT OF INPUT ORBITER DATA                    FRENCH
C     MPNCHB = 0, NO PUNCH OUT OF INPUT BOOSTER DATA                     FRENCH
C     MPNCHB = 1, FOR PUNCH OUT OF INPUT BOOSTER DATA                    FRENCH
      MPRNTO = 0                                                         FRENCH
      MPRNTB = 0                                                         FRENCH
      MPNCHO = 0                                                         FRENCH
      MPNCHB = 0                                                         FRENCH
      READ(5,1000,END=10)JO,JB,MPRNTO,MPRNTB,MPNCHO,MPNCHB               U1108
      GO TO 15                                                           U1108
C     READ(5,1000)JO,JB,MPRNTO,MPRNTB,MPNCHO,MPNCHB                      U1108
C     IF(EOF,5)10,15                                                     U1108
   10 CALL EXIT                                                          FRENCH
   15 IF(JO.EQ.0) GO TO 20                                               FRENCH
      IF(JO.EQ.1) CALL SET0                                              WDH3
      WRITE (6,1005)                                                     FRENCH
      IF(JO.EQ.2) CALL ORBCAL                                            FRENCH
      MPNCH = MPNCHO                                                     FRENCH
      MPRNT = MPRNTO                                                     FRENCH
      CALL READY                                                         FRENCH
       CALL STORE                                                        FRENCH
      CALL ORBSTO                                                        FRENCH
   20 IF(JB.EQ.0) RETURN                                                 FRENCH
      IF(JB.EQ.1) CALL SET0                                              WDH3
      WRITE (6,1005)                                                     FRENCH
      IF(JB.LT.2) GO TO 25                                               FRENCH
      CALL BOOCAL                                                        FRENCH
      C(3) = SCB(3)                                                      FRENCH
      C(5) = SCB(5)                                                      FRENCH
      C(7) = SCB(7)                                                      FRENCH
      C(146) = SCB(146)                                                  FRENCH
      C(31) = SCB(31)                                                    FRENCH
      C(56) = SCB(56)                                                    FRENCH
      C(129) = SCB(129)                                                  FRENCH
      C(211)=SCB(211)                                                    FRENCH
      C(67) = SCB(67)                                                    FRENCH
   25 CONTINUE                                                           FRENCH
      MPRNT = MPRNTB                                                     FRENCH
      MPNCH = MPNCHB                                                     FRENCH
      CALL READY                                                         FRENCH
       CALL STORE                                                        FRENCH
      CALL BOOSTO                                                        FRENCH
      RETURN                                                             FRENCH
 1000 FORMAT (6I2)                                                       FRENCH
 1005 FORMAT (1H1)                                                       FRENCH
      END                                                                FRENCH
  ELT TRAJA,1,710302, 33640
  EOF "                                                                        "
      SUBROUTINE TRAJA                                                   TRAJA
      REAL                                                               TRAJA
     1 LAT,   LNG,   ITT1,  ITT2,  ITT3,  LAM,   MULT,  JETW,  LAMC,     TRAJA
     2 LAMDT, LTW,   LTX,   LTY,   LTZ                                   TRAJA
      DIMENSION                                                          TRAJA
     1 TWD11(15), TWD12(15), TWD13(15), AREF1(15), AREF2(15), AREF3(15), LT002
     2 STEP(15),  TOL1(15),  TOL2(15),  TOL3(15),  TOL4(15),  TOL5(15),  LT002
     3 TOL6(15),  TOL7(15),  HTL1(15),  HTL2(15),  HTL3(15),  HTL4(15),  LT002
     4 HTL5(15),  HTL6(15),  HTL7(15),  STGC(15),  STGV(15),  STGT(15),  LT002
     5 STGD(15),  JETW(15),  ATMC(15),  AC1(15),   AC2(15),   AC3(15),   LT002
     6 TWC(15),   SIGC(15),  ALPC(15),  LAMC(15),  PSIDT(15), SIGDT(15), LT002
     7 ALPDT(15), LAMDT(15), HMIN(15),  HCOEF(15), BCKT(15),  BCKTT(15), LT002
     8 SPSI(15),  SSIG(15),  SALP(15),  SLAM(15),  XKA1(1,1), XKA2(2,5), LT002
     9 XKA3(2,5), TWD1(15),  TWD2(15),  TWD3(15),  TWD4(15),  TWD5(2),   LT002
     1 TWD6(15),  TWD10(15), GDOT(15),  XOUT(15),  CVC1(4),   CVC2(4),   LT002
     2 CVC3(4),   CVN1(4),   CVN2(4),   CVN3(4),   ECC1(4),   ECC2(4),   LT002
     3 ECC3(4),   ECN1(4),   ECN2(4),   ECN3(4),   DCV1(4),   DCV2(4),   LT002
     4 DCV3(4),   CVM1(4),   CVM2(4),   CVM3(4),   CVL1(4),   CVL2(4),   LT002
     5 CVL3(4),   ECT1(4),   ECT2(4),   ECT3(4),   EC1(4),    EC2(4),    LT002
     6 EC3(4),    GIS(4),    ITT1(4),   ITT2(4),   ITT3(4),   CRGF(4),   LT002
     7 TLAT(4),   TLNG(4),   TOL8(15),  HTL8(15),  ORB(15),   GMC1(15),  LT002
     8 GMC2(15),  GMC3(15),  GMC4(15),  XKPT(4),   PITX(15),  PSEC(15),  LT002
     9 PTME(15),  PRIF(15),  TWD14(15), VSET(15),  VINC(15),  WOUT(15),  LT002
     1 RDALT(4)                                                          LT002
      COMMON/APV/ALT(200),PRS(200),VLS(200)                              TRAJA
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/DATAX/ HANM,HPNM,TRANOM ,                                   JDA6
     1 RAD,   VEL,   GAM,   AZM,   LAT,   LNG,   WGH,   ALT0,  SEC,      TRAJA
     2 PLD,   CVC1,  CVC2,  CVC3,  CVN1,  CVN2,  CVN3,  ECC1,  ECC2,     TRAJA
     3 ECC3,  ECN1,  ECN2,  ECN3,  DCV1,  DCV2,  DCV3,  CVM1,  CVM2,     TRAJA
     4 CVM3,  CVL1,  CVL2,  CVL3,  ECT1,  ECT2,  ECT3,  G0,    CK,       TRAJA
     5 WE,    D2,    D3,    D4,    AGQ,   ATQ,   P0,    CNV1,  CNV2,     TRAJA
     6 CNV3,  ALTQ,  STPF,  A, B, RDALT,  T0,    EC1,   EC2,   EC3,      TRAJA
     7 GIS,   ZOUT,  ITT1,  ITT2,  ITT3,  PSI,   SIG,   ALP,   LAM,      TRAJA
     8 MULT,  VELQ,  PRNT,  PSIF,  CRGF,  TLAT,  TLNG,  ALTF,  AZMF,     TRAJA
     9 TWE,   TWD11, TWD12, TWD13, AREF1, AREF2, AREF3, STEP,  TOL1,     TRAJA
     1 TOL2,  TOL3,  TOL4,  TOL5,  TOL6,  TOL7,  HTL1,  HTL2,  HTL3,     TRAJA
     2 HTL4,  HTL5,  HTL6,  HTL7,  STGC,  STGV,  STGT,  STGD,  JETW,     TRAJA
     3 ATMC,  AC1,   AC2,   AC3,   TWC,   SIGC,  ALPC,  LAMC,  PSIDT,    TRAJA
     4 SIGDT, ALPDT, LAMDT, HMIN,  HCOEF, BCKT,  BCKTT, SPSI,  SSIG,     TRAJA
     5 SALP,  SLAM,  YOUT,  CNV4,  XKA0,  XKA1,  VSET,  VINC,  WOUT,     TRAJA
     6 XKA2,  XKA3,  RFCN,  AZMI,  GTIP,  TWD1,  TWD2,  TWD3,  TWD4,     TRAJA
     7 TWD5,  TWD6,  TWD14, PRIF,  PTME,  TWD10, VGAI,  GDOT,  XOUT,     TRAJA
     8 TOL8,  HTL8,  ORB,   GMC1,  GMC2,  GMC3,  GMC4,  XKPT,  PITX,     TRAJA
     9 PSEC                                                              TRAJA
      NAMELIST/DATA1/HANM,HPNM,TRANOM,                                   JDA6
     1 RAD,   VEL,   GAM,   AZM,   LAT,   LNG,   WGH,   ALT0,  SEC,      TRAJA
     2 PLD,   CVC1,  CVC2,  CVC3,  CVN1,  CVN2,  CVN3,  ECC1,  ECC2,     TRAJA
     3 ECC3,  ECN1,  ECN2,  ECN3,  DCV1,  DCV2,  DCV3,  CVM1,  CVM2,     TRAJA
     4 CVM3,  CVL1,  CVL2,  CVL3,  ECT1,  ECT2,  ECT3,  G0,    CK,       TRAJA
     5 WE,    D2,    D3,    D4,    AGQ,   ATQ,   P0,    CNV1,  CNV2,     TRAJA
     6 CNV3,  ALTQ,  STPF,  A, B, RDALT,  T0,    EC1,   EC2,   EC3,      TRAJA
     7 GIS,   ZOUT,  ITT1,  ITT2,  ITT3,  PSI,   SIG,   ALP,   LAM,      TRAJA
     8 MULT,  VELQ,  PRNT,  PSIF,  CRGF,  TLAT,  TLNG,  ALTF,  AZMF,     TRAJA
     9 TWE,   TWD11, TWD12, TWD13, AREF1, AREF2, AREF3, STEP,  TOL1,     TRAJA
     1 TOL2,  TOL3,  TOL4,  TOL5,  TOL6,  TOL7,  HTL1,  HTL2,  HTL3,     TRAJA
     2 HTL4,  HTL5,  HTL6,  HTL7,  STGC,  STGV,  STGT,  STGD,  JETW,     TRAJA
     3 ATMC,  AC1,   AC2,   AC3,   TWC,   SIGC,  ALPC,  LAMC,  PSIDT,    TRAJA
     4 SIGDT, ALPDT, LAMDT, HMIN,  HCOEF, BCKT,  BCKTT, SPSI,  SSIG,     TRAJA
     5 SALP,  SLAM,  ALT,   PRS,   VLS,   YOUT,  CNV4,  XM1,   A1,       TRAJA
     6 C1,    XM2,   A2,    C2,    XM3,   A3,    C3,    XKA0,  XKA1,     TRAJA
     7 XKA2,  XKA3,  RFCN,  AZMI,  GTIP,  TWD1,  TWD2,  TWD3,  TWD4,     TRAJA
     8 TWD5,  TWD6,  TWD7,  TWD8,  TWD9,  TWD10, VGAI,  GDOT,  XOUT,     TRAJA
     9 TOL8,  HTL8,  ORB,   GMC1,  GMC2,  GMC3,  GMC4,  XKPT,  PITX,     TRAJA
     1 PSEC,  PTME,  PRIF,  TWD14, PT,    PDT,   VSET,  VINC,  WOUT      TRAJA
 1002 FORMAT(1H1,41X,35H *****   INITIAL CONDITIONS   *****//5X,2H A,18X TRAJA
     1,4H AGQ,16X,4H ALP,16X,4H ATQ,16X,5H ALTF,15X,5H ALTQ/5X,5H ALT0,1 TRAJA
     25X,4H AZM,16X,5H AZMF,15X,5H AZMI,15X,2H B,18X,3H CK/5X,5H CNV1,15 TRAJA
     3X,5H CNV2,15X,5H CNV3,15X,5H CNV4,15X,3H D2,17X,3H D3/5X,3H D4,17X TRAJA
     4,4H GAM,16X,5H GTIP,15X,3H G0,17X,4H LAM,16X,4H LAT//5X,4H LNG,16X TRAJA
     5,5H MULT,15X,4H PLD,16X,5H PRNT,15X,4H PSI,16X,5H PSIF/5X,3H P0,17 TRAJA
     6X,4H RAD,16X,5H RFCN,15X,4H SEC,16X,4H SIG,16X,5H STPF/5X,4H TWE,1 TRAJA
     76X,3H T0,17X,4H VEL,16X,5H VELQ,15X,5H VGAI,15X,3H WE/5X,4H WGH,16 TRAJA
     8X,5H YOUT,15X,5H ZOUT////4(6E20.8/)/3(6E20.8/),3E20.8////)         TRAJA
 1003 FORMAT(1H1,44X,29H *****   SECTION DATA   *****//5X,4H AC1,16X,4H  TRAJA
     1AC2,16X,4H AC3,16X,5H ALPC,15X,6H ALPDT,14X,6H AREF1/5X,6H AREF2,  TRAJA
     214X,6H AREF3,14X,5H ATMC,15X,5H BCKT,15X,6H BCKTT,14X,5H GDOT/5X,  TRAJA
     36H GMC1 ,14X,6H GMC2 ,14X,6H GMC3 ,14X,6H GMC4 ,14X,6H HCOEF,14X,5 TRAJA
     4H HMIN/5X,5H HTL1,15X,5H HTL2,15X,5H HTL3,15X,5H HTL4,15X,5H HTL5, TRAJA
     515X,5H HTL6/ 5X,5H HTL7,15X,5H HTL8,15X,5H JETW,15X,5H LAMC,15X,6H TRAJA
     6 LAMDT,14X,4H ORB/5X,5H PITX,15X,6H PSIDT,14X,5H PRIF,15X,5H PSEC, TRAJA
     715X,5H PTME,15X,5H SALP//5X,5H SIGC,15X,6H SIGDT,14X,5H SLAM,15X,5 TRAJA
     8H SPSI,15X,5H SSIG,15X,5H STEP/5X,5H STGC,15X,5H STGD,15X,5H STGT, TRAJA
     915X,5H STGV,15X,5H TOL1,15X,5H TOL2/5X,5H TOL3,15X,5H TOL4,15X,5H  TRAJA
     1TOL5,15X,5H TOL6,15X,5H TOL7,15X,5H TOL8/5X,4H TWC,16X,5H TWD1,15X TRAJA
     2,5H TWD2,15X,5H TWD3,15X,5H TWD4,15X,5H TWD6/5X,6H TWD10,14X,6H TW TRAJA
     3D11,14X,6H TWD12,14X,6H TWD13,14X,6H TWD14,14X,5H VINC/5X,5H VSET, TRAJA
     415X,5H WOUT,15X,5H XOUT/)                                          TRAJA
 1004 FORMAT(1X,I2,E17.8,5E20.8/5(6E20.8/)/5(6E20.8/),3E20.8/)           TRAJA
 1005 FORMAT(6E20.8)                                                     TRAJA
 1006 FORMAT(20H1   ATMOSPHERE TABLE///8X,14H ALTITUDE (FT)//)           TRAJA
 1007 FORMAT(1H0/8X,18H PRESSURE (LB/IN2)//)                             TRAJA
 1008 FORMAT(1H0/8X,27H VELOCITY OF SOUND (FT/SEC)//)                    TRAJA
 1009 FORMAT(1H1,)                                                       TRAJA
 1010 FORMAT(40X,39H *****   TARGET POINT REFERENCE   *****//5X,8H CRGF( TRAJA
     11),12X,9H RDALT(1),11X,8H TLAT(1),12X,8H TLNG(1),12X,8H CRGF(2),12 TRAJA
     2X,9H RDALT(2)/5X,8H TLAT(2),12X,8H TLNG(2),12X,8H CRGF(3),12X,9H R TRAJA
     3DALT(2),11X,8H TLAT(3),12X, 8H TLNG(3)/5X,8H CRGF(4),12X,9H RDALT( TRAJA
     44),11X,8H TLAT(4),12X,8H TLNG(4)// 2(6E20.8/),4E20.8///)           TRAJA
 1011 FORMAT(1H0/17H    AERO(1) TABLE,I3//8X,12H MACH NUMBER//)          TRAJA
 1012 FORMAT(1H0/8X,26H YAW ANGLE OF ATTACK (DEG)//)                     TRAJA
 1013 FORMAT(1H0/8X,24H AERODYNAMIC COEFFICIENT//)                       TRAJA
 1014 FORMAT(1H0/17H    AERO(2) TABLE,I3//8X,12H MACH NUMBER//)          TRAJA
 1015 FORMAT(1H0/8X,28H PITCH ANGLE OF ATTACK (DEG)//)                   TRAJA
 1016 FORMAT(1H0/17H    AERO(3) TABLE,I3//8X,12H MACH NUMBER//)          TRAJA
 1017 FORMAT(1H0,)                                                       TRAJA
 1018 FORMAT(1H0/20H    PROPULSION TABLE,I3//8X,11H TIME (SEC)//)        TRAJA
 1019 FORMAT(1H0/8X,34H VACUUM THRUST FOR ONE ENGINE (LB)//)             TRAJA
 1020 FORMAT(1H0/8X,41H - TIME RATE OF CHANGE IN WEIGHT (LB/SEC)//)      TRAJA
 1021 FORMAT(29X,32H *****   GENERAL ITERATION BLOCK,I3,19X,6H GIS =,F3. TRAJA
     10,8H   *****//5X5H CVC1,15X,5H CVC2,15X,5H CVC3,15X,5H CVL1,15X,5H TRAJA
     2 CVL2,15X,5H CVL3/5X,5H CVM1,15X,5H CVM2,15X,5H CVM3,15X,5H CVN1,1 TRAJA
     35X,5H CVN2,15X,5H CVN3/5X,5H DCV1,15X,5H DCV2,15X,5H DCV3,15X,4H E TRAJA
     4C1,16X,4H EC2,16X,4H EC3//5X,5H ECC1,15X,5H ECC2,15X,5H ECC3,15X,5 TRAJA
     5H ECN1,15X,5H ECN2,15X,5H ECN3/5X,5H ECT1,15X,5H ECT2,15X,5H ECT3, TRAJA
     615X,5H ITT1,15X,5H ITT2,15X,5H ITT3///3(6E20.8/)/2(6E20.8/)///)    TRAJA
 1022 FORMAT(1H0/20H    PITCH RATE TABLE,I3//8X,11H TIME (SEC)//)        TRAJA
 1023 FORMAT(1H0/8X,27H PITCH RATE STEPS (DEG/SEC)//)                    TRAJA
 1025 FORMAT(1H0/49H    PITCH ANGLE OF ATTACK  ***  MACH NUMBER TABLE,I3 LT002
     1//8X,12H MACH NUMBER//)                                            LT002
 1026 FORMAT(1H0/8X,28H PITCH ANGLE OF ATTACK (DEG)//)                   LT002
      XMULT = W(37)                                                      TRAJA
      DO 71 L=1,2                                                        TRAJA
   71 TWD9(1,L) = -10000.                                                TRAJA
      READ(5,DATA1)                                                      TRAJA
      CALL TRAJC                                                         TRAJA
      IF(SQ(19,5).EQ.4.) ORB(3) = 2.                                     TRAJA
      V(1)  = RAD                                                        TRAJA
      V(2)  = VEL                                                        TRAJA
      V(3)  = GAM                                                        TRAJA
      V(4)  = AZM                                                        TRAJA
      V(5)  = LAT                                                        TRAJA
      V(6)  = LNG                                                        TRAJA
      V(7)  = WGH                                                        TRAJA
      V(8)  = ALT0                                                       TRAJA
      V(9)  = SEC  + .1                                                  TRAJA
      V(10) = PLD                                                        TRAJA
      V(35) = G0                                                         TRAJA
      V(36) = CK                                                         TRAJA
      V(37) = WE                                                         TRAJA
      V(38) = D2                                                         TRAJA
      V(39) = D3                                                         TRAJA
      V(40) = D4                                                         TRAJA
      V(41) = AGQ                                                        TRAJA
      V(42) = ATQ                                                        TRAJA
      V(43) = P0                                                         TRAJA
      V(44) = CNV1                                                       TRAJA
      V(45) = CNV2                                                       TRAJA
      V(46) = CNV3                                                       TRAJA
      V(47) = ALTQ                                                       TRAJA
      V(48) = STPF + .1                                                  TRAJA
      V(49) = A                                                          TRAJA
      V(50) = B                                                          TRAJA
      IF(V(50).GT.V(49)-1..OR.V(50).LT.1.) V(50) = V(49)                 TRAJA
      V(51) = T0                                                         TRAJA
      V(56) = ZOUT + .1                                                  TRAJA
      V(60) = PSI                                                        TRAJA
      V(61) = SIG                                                        TRAJA
      V(62) = ALP                                                        TRAJA
      V(63) = LAM                                                        TRAJA
      V(64) = MULT + SIGN(.1,MULT)                                       TRAJA
      V(65) = VELQ                                                       TRAJA
      V(66) = PRNT + .1                                                  TRAJA
      V(67) = PSIF + .1                                                  TRAJA
      V(71) = ALTF                                                       TRAJA
      V(72) = AZMF                                                       TRAJA
      V(73) = TWE                                                        TRAJA
      V(74) = RFCN + .1                                                  TRAJA
      V(75) = AZMI                                                       TRAJA
      V(76) = GTIP                                                       TRAJA
      V(77) = VGAI + .1                                                  TRAJA
      V(78) = YOUT + .1                                                  TRAJA
      V(79) = CNV4                                                       TRAJA
      LSEC = IFIX(V(9))                                                  TRAJA
      DO 90 K=1,LSEC                                                     TRAJA
      Q(1,K)  = TWD11(K)                                                 TRAJA
      Q(2,K)  = TWD12(K)                                                 TRAJA
      Q(3,K)  = TWD13(K)                                                 TRAJA
      Q(4,K)  = AREF1(K)                                                 TRAJA
      Q(5,K)  = AREF2(K)                                                 TRAJA
      Q(6,K)  = AREF3(K)                                                 TRAJA
      Q(7,K)  = STEP(K)                                                  TRAJA
      Q(8,K)  = TOL1(K)                                                  TRAJA
      Q(9,K)  = TOL2(K)                                                  TRAJA
      Q(10,K) = TOL3(K)                                                  TRAJA
      Q(11,K) = TOL4(K)                                                  TRAJA
      Q(12,K) = TOL5(K)                                                  TRAJA
      Q(13,K) = TOL6(K)                                                  TRAJA
      Q(14,K) = TOL7(K)                                                  TRAJA
      Q(15,K) = HTL1(K)                                                  TRAJA
      Q(16,K) = HTL2(K)                                                  TRAJA
      Q(17,K) = HTL3(K)                                                  TRAJA
      Q(18,K) = HTL4(K)                                                  TRAJA
      Q(19,K) = HTL5(K)                                                  TRAJA
      Q(20,K) = HTL6(K)                                                  TRAJA
      Q(21,K) = HTL7(K)                                                  TRAJA
      Q(22,K) = STGC(K) + SIGN(.1,STGC(K))                               TRAJA
      Q(23,K) = STGV(K)                                                  TRAJA
      Q(24,K) = STGT(K)                                                  TRAJA
      Q(25,K) = STGD(K) + SIGN(.1,STGD(K))                               TRAJA
      Q(26,K) = JETW(K)                                                  TRAJA
      Q(27,K) = ATMC(K) + .1                                             TRAJA
      Q(28,K) = AC1(K)  + .1                                             TRAJA
      Q(29,K) = AC2(K)  + .1                                             TRAJA
      Q(30,K) = AC3(K)  + .1                                             TRAJA
      Q(31,K) = TWC(K)  + .1                                             TRAJA
      Q(32,K) = SIGC(K) + .1                                             TRAJA
      Q(33,K) = ALPC(K) + .1                                             TRAJA
      Q(34,K) = LAMC(K) + .1                                             TRAJA
      Q(35,K) = PSIDT(K)                                                 TRAJA
      Q(36,K) = SIGDT(K)                                                 TRAJA
      Q(37,K) = ALPDT(K)                                                 TRAJA
      Q(38,K) = LAMDT(K)                                                 TRAJA
      Q(39,K) = HMIN(K)                                                  TRAJA
      Q(40,K) = HCOEF(K)                                                 TRAJA
      Q(41,K) = BCKT(K)                                                  TRAJA
      Q(42,K) = BCKTT(K)                                                 TRAJA
      Q(43,K) = SPSI(K)                                                  TRAJA
      Q(44,K) = SSIG(K)                                                  TRAJA
      Q(45,K) = SALP(K)                                                  TRAJA
      Q(46,K) = SLAM(K)                                                  TRAJA
      Q(47,K) = TWD1(K) + .1                                             TRAJA
      Q(48,K) = TWD2(K)                                                  TRAJA
      Q(49,K) = TWD3(K)                                                  TRAJA
      Q(50,K) = TWD4(K)                                                  TRAJA
      Q(51,K) = TWD10(K)                                                 TRAJA
      Q(52,K) = GDOT(K)                                                  TRAJA
      Q(53,K) = XOUT(K) + .1                                             TRAJA
      Q(54,K) = TOL8(K)                                                  TRAJA
      Q(55,K) = HTL8(K)                                                  TRAJA
      Q(56,K) = ORB(K)  + .1                                             TRAJA
      Q(57,K) = GMC1(K)                                                  TRAJA
      Q(58,K) = GMC2(K)                                                  TRAJA
      Q(59,K) = GMC3(K)                                                  TRAJA
      Q(60,K) = GMC4(K)                                                  TRAJA
      Q(61,K) = TWD6(K)                                                  TRAJA
      Q(62,K) = PITX(K)                                                  TRAJA
      Q(63,K) = PSEC(K) + .1                                             TRAJA
      Q(64,K) = PTME(K)                                                  TRAJA
      Q(65,K) = PRIF(K) + .1                                             TRAJA
      Q(66,K) = TWD14(K)                                                 TRAJA
      Q(67,K) = VSET(K) + .1                                             TRAJA
      Q(68,K) = VINC(K)                                                  TRAJA
      Q(69,K) = WOUT(K) + .1                                             TRAJA
   90 CONTINUE                                                           TRAJA
      DO 60 L=1,4                                                        TRAJA
      VQ(28,L) = GIS(L)  + .1                                            TRAJA
      VQ(32,L) = CRGF(L) + .1                                            TRAJA
      VQ(33,L) = TLAT(L)                                                 TRAJA
      VQ(34,L) = TLNG(L)                                                 TRAJA
      VQ(35,L) = RDALT(L)                                                TRAJA
      IF(GIS(L).LT..5) GO TO 60                                          TRAJA
      VQ(1,L)  = CVC1(L) + .1                                            TRAJA
      VQ(2,L)  = CVC2(L) + .1                                            TRAJA
      VQ(3,L)  = CVC3(L) + .1                                            TRAJA
      VQ(4,L)  = CVN1(L) + .1                                            TRAJA
      VQ(5,L)  = CVN2(L) + .1                                            TRAJA
      VQ(6,L)  = CVN3(L) + .1                                            TRAJA
      VQ(7,L)  = ECC1(L) + SIGN(.1,ECC1(L))                              TRAJA
      VQ(8,L)  = ECC2(L) + SIGN(.1,ECC2(L))                              TRAJA
      VQ(9,L)  = ECC3(L) + SIGN(.1,ECC3(L))                              TRAJA
      VQ(10,L) = ECN1(L) + .1                                            TRAJA
      VQ(11,L) = ECN2(L) + .1                                            TRAJA
      VQ(12,L) = ECN3(L) + .1                                            TRAJA
      VQ(13,L) = DCV1(L)                                                 TRAJA
      VQ(14,L) = DCV2(L)                                                 TRAJA
      VQ(15,L) = DCV3(L)                                                 TRAJA
      VQ(16,L) = CVM1(L)                                                 TRAJA
      VQ(17,L) = CVM2(L)                                                 TRAJA
      VQ(18,L) = CVM3(L)                                                 TRAJA
      VQ(19,L) = CVL1(L)                                                 TRAJA
      VQ(20,L) = CVL2(L)                                                 TRAJA
      VQ(21,L) = CVL3(L)                                                 TRAJA
      VQ(22,L) = ECT1(L)                                                 TRAJA
      VQ(23,L) = ECT2(L)                                                 TRAJA
      VQ(24,L) = ECT3(L)                                                 TRAJA
      VQ(25,L) = EC1(L)                                                  TRAJA
      VQ(26,L) = EC2(L)                                                  TRAJA
      VQ(27,L) = EC3(L)                                                  TRAJA
      VQ(29,L) = ITT1(L) + .1                                            TRAJA
      VQ(30,L) = ITT2(L) + .1                                            TRAJA
      VQ(31,L) = ITT3(L) + .1                                            TRAJA
   60 CONTINUE                                                           TRAJA
      XNA0 = XKA0 + .1                                                   TRAJA
      DO 91 L=1,2                                                        TRAJA
      XNP(L) = TWD5(L) + .1                                              TRAJA
   91 CONTINUE                                                           LT002
      DO 56 L=1,4                                                        LT002
      XNPT(L) = XKPT(L) + .1                                             TRAJA
   56 CONTINUE                                                           LT002
      XNA1(1,1) = XKA1(1,1) + .1                                         TRAJA
      DO 54 L=1,5                                                        LT002
      DO 55 K=1,2                                                        LT002
      XNA2(K,L) = XKA2(K,L) + .1                                         TRAJA
      XNA3(K,L) = XKA3(K,L) + .1                                         LT002
   55 CONTINUE                                                           LT002
   54 CONTINUE                                                           LT002
C        CYCLE CHECK FOR AZIMUTH AND LONGITUDE                           TRAJA
      DO 75 K=1,LSEC                                                     TRAJA
      IF(Q(65,K).GT..5) GO TO 76                                         TRAJA
   75 CONTINUE                                                           TRAJA
      DO 19 K=4,6,2                                                      TRAJA
      LQ = 25                                                            TRAJA
   80 LQ = LQ - 1                                                        LT002
      IF(V(K).LT.0.) GO TO 20                                            TRAJA
      IF(V(K).LT.360.) GO TO 19                                          TRAJA
      V(K) = V(K) - 360.                                                 TRAJA
      GO TO 81                                                           LT002
   20 V(K) = V(K) + 360.                                                 TRAJA
   81 IF(LQ.GT.0) GO TO 80                                               LT002
   19 CONTINUE                                                           TRAJA
C        INITIAL ALTITUDE AND RADIUS MAGNITUDE                           TRAJA
   76 ARG5 = V(5)/V(45)                                                  TRAJA
      SIN5 = SIN(ARG5)                                                   TRAJA
      COS5 = COS(ARG5)                                                   TRAJA
      IF(V(50).GT.V(49).OR.V(50).LT.1.) GO TO 21                         TRAJA
      IF(ABS(V(5)).LT..00005) GO TO 21                                   TRAJA
      Z(14) = 1./SQRT((COS5/V(49))**2 + (SIN5/V(50))**2)                 TRAJA
      GO TO 22                                                           TRAJA
   21 Z(14) = V(49)                                                      TRAJA
   22 IF(V(71).GT..5) GO TO 12                                           TRAJA
      V(1) = V(8) + Z(14)                                                TRAJA
      GO TO 13                                                           TRAJA
   12 V(8) = V(1) - Z(14)                                                TRAJA
C        INITIAL MODE (INERTIAL OR RELATIVE VELOCITY, GAMMA, AND AZIMUTH TRAJA
   13 IF(V(77).LT..5) GO TO 40                                           TRAJA
      ARG3 = V(3)/V(45)                                                  TRAJA
      SIN3 = SIN(ARG3)                                                   TRAJA
      COS3 = COS(ARG3)                                                   TRAJA
      IF(V(77).LT.1.5) GO TO 41                                          TRAJA
      IF(ABS(COS5).LT..000001) GO TO 42                                  TRAJA
      SIN4 = COS(V(4)/V(45))/COS5                                        TRAJA
      IF(ABS(SIN4).GT..999990) GO TO 43                                  TRAJA
      ARG4 = ASIN(SIN4)                                                  TRAJA
      IF(V(77).GT.2.5) ARG4 = V(44) - ARG4                               TRAJA
      IF(V(4).LT.0.) ARG4 = ARG4 + 2.*V(44)                              TRAJA
      COS4 = COS(ARG4)                                                   TRAJA
      GO TO 44                                                           TRAJA
   42 SIN4 = 1.                                                          TRAJA
      COS4 = 0.                                                          TRAJA
      IF(V(77).GT.2.5) SIN4 = -1.                                        TRAJA
      GO TO 44                                                           TRAJA
   43 COS4 = 0.                                                          TRAJA
      IF(SIN4.LT.0.) GO TO 45                                            TRAJA
      SIN4 = 1.                                                          TRAJA
      GO TO 44                                                           TRAJA
   45 SIN4 = -1.                                                         TRAJA
      GO TO 44                                                           TRAJA
   41 ARG4 = V(4)/V(45)                                                  TRAJA
      SIN4 = SIN(ARG4)                                                   TRAJA
      COS4 = COS(ARG4)                                                   TRAJA
   44 VRX = V(2)*COS3*SIN4 - V(1)*V(37)*COS5/V(45)                       TRAJA
      VRY = V(2)*COS3*COS4                                               TRAJA
      VRZ = V(2)*SIN3                                                    TRAJA
      VARG = SQRT(VRX*VRX + VRY*VRY + VRZ*VRZ)                           TRAJA
      IF(ABS(VARG).LT..000001) GO TO 46                                  TRAJA
      SARG = V(2)*SIN3/VARG                                              TRAJA
      IF(ABS(SARG).GT..999990) GO TO 47                                  TRAJA
      V(3) = V(45)*ASIN(SARG)                                            TRAJA
      CARG = COS(V(3)/V(45))                                             TRAJA
      GO TO 48                                                           TRAJA
   46 V(2) = VARG                                                        TRAJA
      GO TO 40                                                           TRAJA
   47 V(2) = VARG                                                        TRAJA
      V(4) = 0.                                                          TRAJA
      IF(SARG.LT.0.) GO TO 49                                            TRAJA
      V(3) = 90.                                                         TRAJA
      GO TO 40                                                           TRAJA
   49 V(3) = -90.                                                        TRAJA
      GO TO 40                                                           TRAJA
   48 ARG = VARG*CARG                                                    TRAJA
      IF(ABS(ARG).LT..000001) GO TO 51                                   TRAJA
      ARG = V(2)*COS3*COS4/ARG                                           TRAJA
      V(2) = VARG                                                        TRAJA
      IF(ABS(ARG).GT..999990) GO TO 52                                   TRAJA
      V(4) = V(45)*ACOS(ARG)                                             TRAJA
      IF(VRX.LT.0.) V(4) = 360. - V(4)                                   TRAJA
      GO TO 40                                                           TRAJA
   51 V(2) = VARG                                                        TRAJA
      V(4) = 0.                                                          TRAJA
      GO TO 40                                                           TRAJA
   52 IF(ARG.LT.0.) GO TO 53                                             TRAJA
      V(4) = 0.                                                          TRAJA
      GO TO 40                                                           TRAJA
   53 V(4) = 180.                                                        TRAJA
C        INITIAL PITCH ATTITUDE AND PITCH ANGLE OF ATTACK                TRAJA
   40 IF(V(67).GT..5) GO TO 10                                           TRAJA
      V(60) = 90. - V(62) - V(3)                                         TRAJA
      GO TO 11                                                           TRAJA
   10 V(62) = 90. - V(60) - V(3)                                         TRAJA
C        DOWN RANGE AND CROSS RANGE INITIAL SET-UP                       TRAJA
   11 Z(49) = 0.                                                         TRAJA
      Z(50) = 0.                                                         TRAJA
      Z(51) = 0.                                                         TRAJA
      W(20) = SIN5                                                       TRAJA
      W(21) = COS5                                                       TRAJA
      ARG = V(6)/V(45)                                                   TRAJA
      W(22) = SIN(ARG)                                                   TRAJA
      W(23) = COS(ARG)                                                   TRAJA
      DO 14 K=1,4                                                        TRAJA
      IF(VQ(32,K).LT..5) GO TO 14                                        TRAJA
C  ****  TARGET RANGE  ****                                              TRAJA
      ARG = VQ(33,K)/V(45)                                               TRAJA
      WQ(1,K) = SIN(ARG)                                                 TRAJA
      WQ(2,K) = COS(ARG)                                                 TRAJA
      WQ(10,K) = VQ(35,K) + 1./SQRT((WQ(2,K)/V(49))**2 + (WQ(1,K)/V(50)) TRAJA
     1**2)                                                               TRAJA
      ARG = VQ(34,K)/V(45)                                               TRAJA
      WQ(3,K) = SIN(ARG)                                                 TRAJA
      WQ(4,K) = COS(ARG)                                                 TRAJA
      ARG1 = W(21)*W(23)                                                 TRAJA
      ARG2 = W(21)*W(22)                                                 TRAJA
      ARG3 = WQ(2,K)*WQ(4,K)                                             TRAJA
      ARG4 = WQ(2,K)*WQ(3,K)                                             TRAJA
      WQ(5,K) = ARG1*ARG3 + ARG2*ARG4 + W(20)*WQ(1,K)                    TRAJA
      IF(ABS(WQ(5,K)).GT..9999999) GO TO 15                              TRAJA
      WQ(7,K) = V(45)*ACOS(WQ(5,K))                                      TRAJA
      LTZ = ARG1*ARG4 - ARG3*ARG2                                        TRAJA
      DUM = V(4) - 180.                                                  TRAJA
      IF(DUM*LTZ.GT.0.) WQ(7,K) = 360. - WQ(7,K)                         TRAJA
      WQ(6,K) = SIN(WQ(7,K)/V(45))                                       TRAJA
      GO TO 26                                                           TRAJA
   15 IF(WQ(5,K)) 17,17,18                                               TRAJA
   17 WQ(7,K) = 180.                                                     TRAJA
      GO TO 16                                                           TRAJA
   18 WQ(7,K) = 0.                                                       TRAJA
   16 WQ(6,K) = 0.                                                       TRAJA
      LTZ = 0.                                                           LT002
   26 IF(VQ(32,K).GT.3.5) GO TO 27                                       TRAJA
      IVAR = IFIX(VQ(32,K))                                              TRAJA
      VQ(IVAR+24,K) = WQ(7,K)                                            TRAJA
   27 LTX = ARG2*WQ(1,K) - ARG4*W(20)                                    TRAJA
      LTY = ARG3*W(20) - ARG1*WQ(1,K)                                    TRAJA
      LTW = LTX*W(22) - LTY*W(23)                                        TRAJA
      XLT = SQRT(LTX*LTX + LTY*LTY + LTZ*LTZ)                            TRAJA
      IF(XLT.LT..0000001) GO TO 28                                       TRAJA
      ARG = LTW/XLT                                                      TRAJA
      IF(ARG.GT..9999999) GO TO 34                                       TRAJA
      WQ(8,K) = V(45)*ACOS(ARG)                                          TRAJA
      WQ(9,K) = WQ(8,K)                                                  TRAJA
      IF(LTZ.LT.0.) WQ(9,K) = 360. - WQ(9,K)                             TRAJA
      GO TO 14                                                           TRAJA
   28 WQ(8,K) = V(4)                                                     TRAJA
      WQ(9,K) = V(4)                                                     TRAJA
      GO TO 14                                                           TRAJA
   34 IF(LTW.LT.0.) GO TO 35                                             TRAJA
      WQ(8,K) = 0.                                                       TRAJA
      GO TO 36                                                           TRAJA
   35 WQ(8,K) = 180.                                                     TRAJA
   36 WQ(9,K) = WQ(8,K)                                                  TRAJA
   14 CONTINUE                                                           TRAJA
      IF(V(72).LT..5) GO TO 23                                           TRAJA
C  *****  AUTOMATIC INITIAL AZIMUTH  *****                               TRAJA
      LQL = IFIX(V(72))                                                  TRAJA
      LQK = LQL                                                          TRAJA
      IF(V(72).GT.4.5) LQK = LQK - 4                                     TRAJA
      ARG = (VQ(34,LQK) + V(37)*V(73))/V(45)                             TRAJA
      SINT = SIN(ARG)                                                    TRAJA
      COST = COS(ARG)                                                    TRAJA
      ARG3 = WQ(2,LQK)*COST                                              TRAJA
      ARG4 = WQ(2,LQK)*SINT                                              TRAJA
      LTX = ARG2*WQ(1,LQK) - ARG4*W(20)                                  TRAJA
      LTY = ARG3*W(20) - ARG1*WQ(1,LQK)                                  TRAJA
      LTZ = ARG1*ARG4 - ARG3*ARG2                                        TRAJA
      LTW = LTX*W(22) - LTY*W(23)                                        TRAJA
      XLT = SQRT(LTX*LTX + LTY*LTY + LTZ*LTZ)                            TRAJA
      V(4) = V(45)*ACOS(LTW/XLT)                                         TRAJA
      IF(V(72).GT.4.5) GO TO 24                                          TRAJA
      DC = 1.                                                            TRAJA
      GO TO 25                                                           TRAJA
   24 DC = -1.                                                           TRAJA
   25 IF(DC*LTZ.LT.0.) V(4) = 360. - V(4)                                TRAJA
   23 IF(V(56).LT..5) GO TO 30                                           TRAJA
C        INERTIAL COORDINATE SYSTEM ORIENTATION ANGLES FOR GEMBET AND TS TRAJA
      IF(V(76).LT.900.) GO TO 31                                         TRAJA
      IF(ABS(V(5)).GT.89.995) GO TO 32                                   TRAJA
      ARG = V(49)/V(50)                                                  TRAJA
      ARG = ARG*ARG*TAN(V(5)/V(45))                                      TRAJA
      V(76) = V(45)*ATAN(ARG) - V(5)                                     TRAJA
   31 ARG = (90. - V(5) - V(76))/V(45)                                   TRAJA
      W(25) = SIN(ARG)                                                   TRAJA
      W(26) = COS(ARG)                                                   TRAJA
      GO TO 33                                                           TRAJA
   32 W(25) = 0.                                                         TRAJA
      W(26) = SIGN(1.,V(5))                                              TRAJA
   33 W(29) = V(75)                                                      TRAJA
C  ****  WRITE INITIAL CONDITIONS  ****                                  TRAJA
   30 IF(SQ(1,1) .EQ. 0.) GO TO 67                                       TRAJA
      WRITE(6,1002)  A,     AGQ,   ALP,   ATQ,   ALTF,  ALTQ,  ALT0,     TRAJA
     1 AZM,   AZMF,  AZMI,  B,     CK,    CNV1,  CNV2,  CNV3,  CNV4,     TRAJA
     2 D2,    D3,    D4,    GAM,   GTIP,  G0,    LAM,   LAT,   LNG,      TRAJA
     3 MULT,  PLD,   PRNT,  PSI,   PSIF,  P0,    RAD,   RFCN,  SEC,      TRAJA
     4 SIG,   STPF,  TWE,   T0,    VEL,   VELQ,  VGAI,  WE,    WGH,      TRAJA
     5 YOUT,  ZOUT                                                       TRAJA
      WRITE(6,1010) (CRGF(K), RDALT(K), TLAT(K), TLNG(K), K=1,4)         TRAJA
      IOUT = 1                                                           TRAJA
      DO 69 L=1,4                                                        TRAJA
      IF(VQ(28,L).LT..5) GO TO 69                                        TRAJA
      IF(IOUT.EQ.2) WRITE(6,1009)                                        TRAJA
      WRITE(6,1021)    L,  GIS(L),   CVC1(L),  CVC2(L),  CVC3(L),        TRAJA
     1 CVL1(L),  CVL2(L),  CVL3(L),  CVM1(L),  CVM2(L),  CVM3(L),        TRAJA
     2 CVN1(L),  CVN2(L),  CVN3(L),  DCV1(L),  DCV2(L),  DCV3(L),        TRAJA
     3 EC1(L),   EC2(L),   EC3(L),   ECC1(L),  ECC2(L),  ECC3(L),        TRAJA
     4 ECN1(L),  ECN2(L),  ECN3(L),  ECT1(L),  ECT2(L),  ECT3(L),        TRAJA
     5 ITT1(L),  ITT2(L),  ITT3(L)                                       TRAJA
      IOUT = IOUT + 1                                                    TRAJA
   69 CONTINUE                                                           TRAJA
C  ****  WRITE SECTION DATA  ****                                        TRAJA
      WRITE(6,1003)                                                      TRAJA
      DO 92 L=1,LSEC                                                     TRAJA
      IF(MOD(L,4).EQ.0) WRITE(6,1009)                                    TRAJA
   92 WRITE(6,1004)     L, AC1(L),   AC2(L),   AC3(L),   ALPC(L),        TRAJA
     1 ALPDT(L), AREF1(L), AREF2(L), AREF3(L), ATMC(L),  BCKT(L),        TRAJA
     2 BCKTT(L), GDOT(L),  GMC1(L),  GMC2(L),  GMC3(L),  GMC4(L),        TRAJA
     3 HCOEF(L), HMIN(L),  HTL1(L),  HTL2(L),  HTL3(L),  HTL4(L),        TRAJA
     4 HTL5(L),  HTL6(L),  HTL7(L),  HTL8(L),  JETW(L),  LAMC(L),        TRAJA
     5 LAMDT(L), ORB(L),   PITX(L),  PSIDT(L), PRIF(L),  PSEC(L),        TRAJA
     6 PTME(L),  SALP(L),  SIGC(L),  SIGDT(L), SLAM(L),  SPSI(L),        TRAJA
     7 SSIG(L),  STEP(L),  STGC(L),  STGD(L),  STGT(L),  STGV(L),        TRAJA
     8 TOL1(L),  TOL2(L),  TOL3(L),  TOL4(L),  TOL5(L),  TOL6(L),        TRAJA
     9 TOL7(L),  TOL8(L),  TWC(L),   TWD1(L),  TWD2(L),  TWD3(L),        TRAJA
     1 TWD4(L),  TWD6(L),  TWD10(L), TWD11(L), TWD12(L), TWD13(L),       TRAJA
     2 TWD14(L), VINC(L),  VSET(L),  WOUT(L),  XOUT(L)                   TRAJA
      ISEND = 1 + IFIX(V(78))                                            TRAJA
      GO TO (63,64,65,66,67,68,67), ISEND                                TRAJA
   64 IF(XMULT-.5) 63, 63, 66                                            TRAJA
   65 IF(XMULT-.5) 63, 63, 67                                            TRAJA
   63 IF(XNA0.LT..5) GO TO 97                                            TRAJA
C  ****  WRITE ATMOSPHERE TABLE  ****                                    TRAJA
      ISTOP = IFIX(XNA0)                                                 TRAJA
      DO 89 L=1,LSEC                                                     TRAJA
      IF(Q(27,L).LT..5) GO TO 89                                         TRAJA
      GO TO 88                                                           TRAJA
   89 CONTINUE                                                           TRAJA
      GO TO 97                                                           TRAJA
   88 WRITE(6,1006)                                                      TRAJA
      WRITE(6,1005) (ALT(I),I=1,ISTOP)                                   TRAJA
      WRITE(6,1007)                                                      TRAJA
      WRITE(6,1005) (PRS(I),I=1,ISTOP)                                   TRAJA
      WRITE(6,1008)                                                      TRAJA
      WRITE(6,1005) (VLS(I),I=1,ISTOP)                                   TRAJA
      WRITE(6,1009)                                                      TRAJA
      GO TO 66                                                           TRAJA
   68 IF(XMULT-.5) 66, 66, 67                                            TRAJA
   66 IF(XNA0.LT..5) GO TO 97                                            TRAJA
C  ****  WRITE AERO1 TABLE  ****                                         TRAJA
      DO 96 L=1,1                                                        TRAJA
      IF(XNA1(1,L).LT..5) GO TO 96                                       TRAJA
      ISTOP = IFIX(XNA1(1,L))                                            TRAJA
      KSTOP = IFIX(XNA1(2,L))                                            TRAJA
      WRITE(6,1011) L                                                    TRAJA
      WRITE(6,1005) (XM1(I,L),I=1,ISTOP)                                 TRAJA
      WRITE(6,1012)                                                      TRAJA
      WRITE(6,1005) (A1(K,L),K=1,KSTOP)                                  TRAJA
      WRITE(6,1013)                                                      TRAJA
      DO 87 K=1,KSTOP                                                    TRAJA
      WRITE(6,1005) (C1(I,K,L),I=1,ISTOP)                                TRAJA
   87 WRITE(6,1017)                                                      TRAJA
   96 CONTINUE                                                           TRAJA
C  ****  WRITE AERO2 TABLE  ****                                         TRAJA
      DO 95 L=1,5                                                        LT002
      IF(XNA2(1,L).LT..5) GO TO 95                                       TRAJA
      ISTOP = IFIX(XNA2(1,L))                                            TRAJA
      KSTOP = IFIX(XNA2(2,L))                                            TRAJA
      WRITE(6,1014) L                                                    TRAJA
      WRITE(6,1005) (XM2(I,L),I=1,ISTOP)                                 TRAJA
      WRITE(6,1015)                                                      TRAJA
      WRITE(6,1005) (A2(K,L),K=1,KSTOP)                                  TRAJA
      WRITE(6,1013)                                                      TRAJA
      DO 86 K=1,KSTOP                                                    TRAJA
      WRITE(6,1005) (C2(I,K,L),I=1,ISTOP)                                TRAJA
   86 WRITE(6,1017)                                                      TRAJA
   95 CONTINUE                                                           TRAJA
C  ****  WRITE AERO3 TABLE  ****                                         TRAJA
      DO 94 L=1,5                                                        LT002
      IF(XNA3(1,L).LT..5) GO TO 94                                       TRAJA
      ISTOP = IFIX(XNA3(1,L))                                            TRAJA
      KSTOP = IFIX(XNA3(2,L))                                            TRAJA
      WRITE(6,1016) L                                                    TRAJA
      WRITE(6,1005) (XM3(I,L),I=1,ISTOP)                                 TRAJA
      WRITE(6,1015)                                                      TRAJA
      WRITE(6,1005) (A3(K,L),K=1,KSTOP)                                  TRAJA
      WRITE(6,1013)                                                      TRAJA
      DO 85 K=1,KSTOP                                                    TRAJA
      WRITE(6,1005) (C3(I,K,L),I=1,ISTOP)                                TRAJA
   85 WRITE(6,1017)                                                      TRAJA
   94 CONTINUE                                                           TRAJA
C  ****  WRITE PRPSN TABLE  ****                                         TRAJA
   97 DO 70 L=1,2                                                        TRAJA
      IF(XNP(L).LT..5) GO TO 70                                          TRAJA
      ISTOP = IFIX(XNP(L))                                               TRAJA
      WRITE(6,1018) L                                                    TRAJA
      WRITE(6,1005) (TWD7(I,L),I=1,ISTOP)                                TRAJA
      WRITE(6,1019)                                                      TRAJA
      WRITE(6,1005) (TWD8(I,L),I=1,ISTOP)                                TRAJA
      IF(TWD9(1,L).LT.-9000.) GO TO 70                                   TRAJA
      WRITE(6,1020)                                                      TRAJA
      WRITE(6,1005) (TWD9(I,L),I=1,ISTOP)                                TRAJA
   70 CONTINUE                                                           TRAJA
C  ****  WRITE PITCH RATE TABLE  ****                                    TRAJA
      DO 72 L=1,4                                                        LT002
      IF(XNPT(L).LT.1.5) GO TO 72                                        TRAJA
      DO 73 K=1,LSEC                                                     LT002
      ISEND = IFIX(Q(33,K))                                              LT002
      GO TO (73,73,73,73,73,73,73,74,74,74,74,74,74,74,74,74,74,73,73,73 LT002
     1,73,77,77,77,77,77,77,77,77,77,77), ISEND                          LT002
   74 IISEND = (ISEND-6)/2                                               LT002
      IF(IISEND-L) 73, 78, 73                                            LT002
   78 ISTOP = IFIX(XNPT(L))                                              LT002
      KSTOP = ISTOP - 1                                                  TRAJA
      WRITE(6,1022) L                                                    TRAJA
      WRITE(6,1005) (PT(I,L),I=1,ISTOP)                                  TRAJA
      WRITE(6,1023)                                                      TRAJA
      WRITE(6,1005) (PDT(I,L),I=1,KSTOP)                                 TRAJA
      GO TO 72                                                           LT002
   77 IISEND = (ISEND-20)/2                                              LT002
      IF(IISEND-L) 73, 79, 73                                            LT002
   79 ISTOP = IFIX(XNPT(L))                                              LT002
      WRITE(6,1025) L                                                    LT002
      WRITE(6,1005) (PT(I,L), I=1,ISTOP)                                 LT002
      WRITE(6,1026)                                                      LT002
      WRITE(6,1005) (PDT(I,L), I=1,ISTOP)                                LT002
      GO TO 72                                                           LT002
   73 CONTINUE                                                           LT002
   72 CONTINUE                                                           TRAJA
   67 MULT = 0.                                                          TRAJA
      XMULT = 1.                                                         TRAJA
      W(37) = XMULT                                                      TRAJA
      RETURN                                                             TRAJA
      END                                                                TRAJA
  ELT TBL2D,1,710302, 33642
  EOF "                                                                        "
      SUBROUTINE TBL2D(X,Y,XTBL,YTBL,ZTBL,Z)                             TBL2D
C                                                                        TBL2D
C     2 DIMENSIONAL TABLE LOOK-UP                                        TBL2D
C                                                                        TBL2D
      DIMENSION XTBL(7), YTBL(7), ZTBL(7,7)                              TBL2D
      K = 0                                                              TBL2D
      DO 1 II=2,7                                                        EMS1
      I=II                                                               EMS1
      IF(X-XTBL(I)) 3,2,1                                                EMS1
    1 CONTINUE                                                           EMS1
      GO TO 3                                                            EMS1
    2 K = 1                                                              TBL2D
      GO TO 4                                                            TBL2D
    3 SCAL1 = (X-XTBL(I-1))/(XTBL(I)-XTBL(I-1))                          TBL2D
    4 DO 5 JJ=2,7                                                        EMS1
      J=JJ                                                               EMS1
      IF(Y-YTBL(J)) 7,6,5                                                EMS1
    5 CONTINUE                                                           EMS1
      GO TO 7                                                            EMS1
    6 SCAL2 = 1.                                                         TBL2D
      GO TO 8                                                            TBL2D
    7 SCAL2 = (Y-YTBL(J-1))/(YTBL(J)-YTBL(J-1))                          TBL2D
    8 IF(K-1) 9,10,9                                                     TBL2D
    9 Z1 = ZTBL(I-1,J-1) + SCAL1*(ZTBL(I,J-1) - ZTBL(I-1,J-1))           TBL2D
      Z2 = ZTBL(I-1,J) + SCAL1*(ZTBL(I,J) - ZTBL(I-1,J))                 TBL2D
      Z = Z1 + SCAL2*(Z2 - Z1)                                           TBL2D
      RETURN                                                             TBL2D
   10 Z = ZTBL(I,J-1) + SCAL2*(ZTBL(I,J) - ZTBL(I,J-1))                  TBL2D
C                                                                        TBL2D
      RETURN                                                             TBL2D
      END                                                                TBL2D
  ELT GTSM,1,710302, 33645
  EOF "                                                                        "
C     OVERLAY(TTSS,2,0)                                                  U1108
C     PROGRAM GTSM                                                       U1108
      SUBROUTINE GTSM                                                    U1108
      DIMENSION ICV(3)                                                   GTSM
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
 1001 FORMAT(53H0 *****  VEHICLE ATTEMPTED SUBTERRANEAN FLIGHT  *****)   GTSM
 1002 FORMAT(36H0 *****  TABLE ARGUMENT ERROR  *****)                    GTSM
      IF(SV(35).GT.1.5) GO TO 14                                         LT002
      KA  = 1                                                            LT002
      KI1 = 1                                                            LT002
      KI2 = 2                                                            LT002
      LSEC = IFIX(SV(36))                                                LT002
      GO TO 15                                                           LT002
   14 KA = IFIX(SV(36)) + 1                                              LT002
      KI1 = 3                                                            LT002
      KI2 = 4                                                            LT002
      LSEC = IFIX(V(9))                                                  LT002
   15 W(36) = .1                                                         LT002
      V(55) = 0.                                                         GTSM
      V(68) = 0.                                                         GTSM
      DO 10 KI=KI1,KI2                                                   LT002
      W(30) = .1                                                         GTSM
      W(38) = .6                                                         LT001
      DO 43 I=9,12                                                       GTSM
   43 W(I) = .1                                                          GTSM
      IF(VQ(28,KI).GT..5) GO TO 40                                       GTSM
      IF(VQ(32,KI)-.5) 10, 10, 41                                        GTSM
   40 DO 35 K=1,24                                                       GTSM
   35 V(K+10) = VQ(K,KI)                                                 GTSM
      DO 36 K=25,28                                                      GTSM
   36 V(K+27) = VQ(K,KI)                                                 GTSM
      DO 37 K=29,31                                                      GTSM
   37 V(K+28) = VQ(K,KI)                                                 GTSM
   41 DO 38 K=32,34                                                      GTSM
   38 V(K+36) = VQ(K,KI)                                                 GTSM
      V(80) = VQ(35,KI)                                                  GTSM
      DO 39 K=1,7                                                        GTSM
   39 W(K+12) = WQ(K,KI)                                                 GTSM
      W(24) = WQ(8,KI)                                                   GTSM
      W(34) = WQ(9,KI)                                                   GTSM
      W(35) = WQ(10,KI)                                                  GTSM
      ISLCT = IFIX(VQ(28,KI))                                            GTSM
      IF(ISLCT.LT.1) GO TO 10                                            GTSM
      DO 44 K=1,3                                                        GTSM
      IISC = IFIX(V(K+13))                                               GTSM
      JJSC = IISC/100                                                    GTSM
C  ****  ICV(K) IS THE K-TH PRIMARY CONTROL VARIABLE SECTION NUMBER  *** GTSM
   44 ICV(K) = IISC - JJSC*100                                           GTSM
      GO TO (11,12,13,12,13,12,12,12), ISLCT                             GTSM
   11 KARG = ICV(1)                                                      GTSM
      GO TO 18                                                           GTSM
   12 KARG = MIN0(ICV(1),ICV(2))                                         GTSM
      GO TO 18                                                           GTSM
   13 KARG = MIN0(ICV(1),ICV(2),ICV(3))                                  GTSM
   18 IF(KARG.GT.LSEC) GO TO 997                                         GTSM
      KB = KARG - 1                                                      GTSM
      IF(KB.LT.KA) GO TO 19                                              GTSM
      W(7) = 1.1                                                         GTSM
      W(8) = .1                                                          GTSM
      I998 = 1                                                           LT002
   56 CALL TRAJB(JFLAG,KA,KB,KI)                                         LT002
      IF(JFLAG.LE.0.AND.I998.LE.1) GO TO 54                              LT002
      GO TO (55,998), I998                                               LT002
   55 I998 = 2                                                           LT002
      SW2 = SW(2)                                                        LT002
      SW(2) = 1.                                                         LT002
      GO TO 56                                                           LT002
   54 KA = KB + 1                                                        LT002
      IF(KA.GT.LSEC) GO TO 999                                           GTSM
      W(9) = .1                                                          GTSM
   19 W(7) = .1                                                          GTSM
      GO TO (21,32,33,32,33,33,33,33), ISLCT                             GTSM
   21 W(8) = 1.1                                                         GTSM
      ARG = V(20)                                                        GTSM
      KB = IFIX(ARG)                                                     GTSM
      IF(KB.GT.LSEC) GO TO 997                                           GTSM
      CALL XNEW1(JFLAG,1,KA,KB,KI)                                       GTSM
      GO TO 28                                                           GTSM
   32 W(8) = 2.1                                                         GTSM
      ARG = AMAX1(V(20),V(21))                                           GTSM
      GO TO 31                                                           GTSM
   33 W(8) = 3.1                                                         GTSM
      ARG = AMAX1(V(20),V(21),V(22))                                     GTSM
   31 KB = IFIX(ARG)                                                     GTSM
      IF(KB.GT.LSEC) GO TO 997                                           GTSM
      GO TO(21,21,21,24,24,24,24,24), ISLCT                              GTSM
C     GO TO (21,22,23,24,25,26,27,27), ISLCT                             GTSM
C  22 CALL XNEW2(JFLAG,1,2,KA,KB,KI)                                     GTSM
C     GO TO 28                                                           GTSM
C  23 CALL XNEW3(JFLAG,1,2,3,KA,KB,KI)                                   GTSM
C     GO TO 28                                                           GTSM
   24 CALL XNEW4(JFLAG,1,2,KA,KB,KI)                                     GTSM
      GO TO 28                                                           GTSM
C  25 CALL XNEW5(JFLAG,1,2,3,KA,KB,KI)                                   GTSM
C     GO TO 28                                                           GTSM
C  26 CALL XNEW6(JFLAG,1,2,3,KA,KB,KI)                                   GTSM
C     GO TO 28                                                           GTSM
C  27 CALL XNEW7(JFLAG,1,2,3,KA,KB,KI)                                   GTSM
   28 CONTINUE                                                           GTSM
      IF(W(30).GT..5) W(36)=1.1                                          GTSM
      W(7)=1.1                                                           GTSM
      ITRIP = 1                                                          LT002
      IF(JFLAG.LE.0.AND.W(36).LT..5) GO TO 50                            LT002
      ITRIP = 2                                                          LT002
      SW2 = SW(2)                                                        LT002
      SW(2) = 1.                                                         LT002
   50 CALL TRAJB(JFLAG,KA,KB,KI)                                         LT002
      GO TO (57,58), ITRIP                                               LT002
   58 ITRIP = 1                                                          LT002
      SW(2) = SW2                                                        LT002
   57 KA = KB + 1                                                        LT002
      IF(JFLAG.GT.0) GO TO 998                                           GTSM
      IF(KA.GT.LSEC) GO TO 999                                           GTSM
   10 CONTINUE                                                           GTSM
  997 W(7) = 1.1                                                         GTSM
      W(8) = .1                                                          GTSM
      IF(KA.GT.LSEC) GO TO 999                                           GTSM
      W(9) = .1                                                          GTSM
      I998 = 1                                                           LT002
   51 CALL TRAJB(JFLAG,KA,LSEC,KI)                                       LT002
      IF(JFLAG.LE.0.AND.I998.LE.1) GO TO 999                             LT002
      GO TO (52,998), I998                                               LT002
   52 I998 = 2                                                           LT002
      SW2 = SW(2)                                                        LT002
      SW(2) = 1.                                                         LT002
      GO TO 51                                                           LT002
  998 I998 = 1                                                           LT002
      SW(2) = SW2                                                        LT002
      W(36) = 1.1                                                        LT002
      IF(Z(8).LE.-10000.) WRITE(6,1001)                                  GTSM
      IF(Z(8).GT.-10000.) WRITE(6,1002)                                  GTSM
  999 RETURN                                                             GTSM
      END                                                                GTSM
  ELT TRAJB,1,710302, 33650
  EOF "                                                                        "
      SUBROUTINE TRAJB(IFLAG,KA,KB,KI)                                   TRAJB
      DIMENSION XW3(5), XW4(5)                                           LT002
      DIMENSION Y(12), IEC(3), NUM(4), ZS(100)                           LT002
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/AEROX/XW3,XW4                                               TRAJB
      COMMON/LTS/WW(5)                                                   TRAJB
 1001 FORMAT(1H0//5X9H ABS TIME,11X,9H REL TIME,11X,9H ALTITUDE,11X,9H L TRAJB
     1ATITUDE,11X,10H LONGITUDE,10X,7H WEIGHT//5X,13H REL VELOCITY,7X,10 TRAJB
     2H REL GAMMA,10X,12H REL AZIMUTH,8X,15H INRTL VELOCITY,   5X,12H IN TRAJB
     3RTL GAMMA,8X,14H INRTL AZIMUTH/5X,12H HEATING PAR,8X,10H HEAT FLUX TRAJB
     4,10X,7H RADIUS,13X,12H TARGET DIST,8X,12H CROSS RANGE,8X,11H DOWN  TRAJB
     5RANGE/5X,11H ROLL ANGLE,9X,6H ALPHA,14X,10H YAW ANGLE,10X,12H PITC TRAJB
     6H ANGLE,8X,11H WEIGHT DOT,9X,4H ISP/5X,8H C (YAW),12X,10H C (AXIAL TRAJB
     7),10X,11H C (NORMAL),9X,12H YAW F(AERO),8X,14H AXIAL F(AERO),6X,13 TRAJB
     8H NORM F(AERO)//5X,7H THRUST,13X,12H THRUST LOAD,8X,12H PITCH RATE TRAJB
     9 ,8X,14H FORCE (AZMTH),6X,12H FORCE (VEL),8X,14H FORCE (GAMMA)/5X, TRAJB
     112H YAW AERO LD,8X,14H AXIAL AERO LD,6X,13H NORM AERO LD,7X,11H AX TRAJB
     2IAL LOAD,9X,14H TOTAL AERO LD,6X,9H TOTAL LD/5X,10H DYN PRESS,10X, TRAJB
     310H ATM PRESS,10X,10H VEL SOUND,10X,12H MACH NUMBER,8X,15H MERIDIA TRAJB
     4N GRVTY,5X,13H RADIAL GRVTY/5X,12H TOTAL GRVTY,8X,12H SURF RADIUS, TRAJB
     58X,13H GRAVITY LOSS,7X,10H DRAG LOSS,10X,14H MISALIGN LOSS,6X,10H  TRAJB
     6IDEAL VEL/)                                                        TRAJB
 1002 FORMAT(20H0   BURNOUT WEIGHT =,E16.8,21H,   JETTISON WEIGHT =,E16. TRAJB
     18,23H,   SUBSEQUENT WEIGHT =,E16.8)                                TRAJB
 1003 FORMAT(23H    FIRST CONTROL VAR =,E16.8)                           TRAJB
 1004 FORMAT(23H    FIRST CONTROL VAR =,E16.8,23H,  SECOND CONTROL VAR = TRAJB
     1,E16.8)                                                            TRAJB
 1005 FORMAT(23H    FIRST CONTROL VAR =,E16.8,23H,  SECOND CONTROL VAR = TRAJB
     1,E16.8,22H,  THIRD CONTROL VAR =,E16.8)                            TRAJB
 1006 FORMAT(42H0   NUMBER OF TRAJECTORIES FOR THIS CASE =,I4,12X,36H TR TRAJB
     1AJECTORIES PER INSIDE ITERATION =,I4,//50H    INSIDE ITERATIONS PE TRAJB
     2R INTERMEDIATE ITERATION =,I4,4X,48H INTERMEDIATE ITERATIONS PER O TRAJB
     3UTSIDE ITERATION =,I4,// 22H    SIMULATION SECTION,I3,33X,10H PAYL TRAJB
     4OAD =,E16.8)                                                       TRAJB
 1007 FORMAT(22H1   SIMULATION SECTION,I3)                               TRAJB
 1008 FORMAT(20H0   FIRST END COND =,E16.8///)                           TRAJB
 1009 FORMAT(20H0   FIRST END COND =,E16.8,21H,   SECOND END COND =,E16. TRAJB
     18///)                                                              TRAJB
 1010 FORMAT(20H0   FIRST END COND =,E16.8,21H,   SECOND END COND =,E16. TRAJB
     18,20H,   THIRD END COND =,E16.8///)                                TRAJB
 1011 FORMAT(22H1   SIMULATION SECTION,I3,33X,10H PAYLOAD =,E16.8)       TRAJB
 1012 FORMAT(23H    TARGET AZIMUTH    =,E16.8,23H,  TARGET DOWN RANGE  = TRAJB
     1,E16.8///)                                                         TRAJB
 1013 FORMAT(5X,10H RADIUS(1),10X,10H RADIUS(2),10X,10H RADIUS(3),10X,12 TRAJB
     1H VELOCITY(1),8X,12H VELOCITY(2),8X,12H VELOCITY(3)/5X,9H ACCEL(1) TRAJB
     2,11X,9H ACCEL(2),11X,9H ACCEL(3)///)                               TRAJB
 1014 FORMAT(5X,10H RADIUS(1),10X,10H RADIUS(2),10X,10H RADIUS(3),10X,12 TRAJB
     1H VELOCITY(1),8X,12H VELOCITY(2),8X,12H VELOCITY(3)/5X,10H ACCEL(A TRAJB
     21),10X,10H ACCEL(A2),10X,10H ACCEL(A3),10X,10H ACCEL(G1),10X,10H A TRAJB
     3CCEL(G2),10X,10H ACCEL(G3)///)                                     TRAJB
 1015 FORMAT(1H0)                                                        TRAJB
 1016 FORMAT(5X,12H INCLINATION,8X,11H NODAL LONG,9X,12H PERIGEE ARG,    LT002
     18X,12H ORBITAL PAR,8X,14H ENERGY (FPS)2,6X,14H ENERGY (KPS)2/5X,13 LT002
     2H CIRCULAR VEL,7X,11H APOGEE RAD,9X,11H APOGEE VEL,9X,13H TRUE ANO LT002
     3MALY,7X,7H PERIOD,13X,13H ECCENTRICITY/5X,12H PERIGEE,RAD,8X,12H P LT002
     4ERIGEE LAT,8X,11H APOGEE LAT,9X,12H PERIGEE ALT,8X,11H APOGEE ALT) LT002
 1017 FORMAT(22H0   SIMULATION SECTION,I3)                               TRAJB
 1018 FORMAT(20H0   IDEAL VELOCITY =,E16.8,21H,   VELOCITY  RESET =,E16. TRAJB
     18,25H,   SUBSEQUENT VELOCITY =,E16.8)                              TRAJB
 1019 FORMAT(5X,12H SLANT RANGE,8X,11H ELEV ANGLE,9X,8H AZIMUTH/)        TRAJB
 1020 FORMAT(5X,12H SLANT RANGE,8X,11H ELEV ANGLE,9X,8H AZIMUTH,12X,15H  TRAJB
     1SLANT RANGE(T),5X,14H ELEV ANGLE(T),6X,11H AZIMUTH(T)/)            TRAJB
 1021 FORMAT(5X,11H IMPACT LAT,9X,12H IMPACT LONG,8X,14H IMPACT RADIUS,6 TRAJB
     1X,15H TIME TO IMPACT,5X,15H INST IMPCT LNG,5X,15H ANGLE TO IMPCT// TRAJB
     2)                                                                  TRAJB
 1022 FORMAT(5X,12H SLANT RANGE,8X,11H ELEV ANGLE,9X,8H AZIMUTH,12X,15H  LT002
     1SLANT RANGE(T),5X,14H ELEV ANGLE(T),6X,11H AZIMUTH(T)/5X,14H SURF  LT002
     2RANGE(V),6X,14H AZIMUTH DIFF ,6X,11H AZIMUTH(V)/)                  LT002
 1023 FORMAT(50H1   INITIATION OF BOOSTER RETURN FLIGHT TRAJECTORY//22H  LT002
     1   SIMULATION SECTION,I3)                                          LT002
 1024 FORMAT(50H1   INITIATION OF BOOSTER RETURN FLIGHT TRAJECTORY//22H  LT002
     1   SIMULATION SECTION,I3,33X,10H PAYLOAD =,E16.8)                  LT002
 1025 FORMAT(1H0/44H    ****  MAXIMUM LOADING DURING FLYBACK  = ,F8.5,9H LT002
     1  G  ****/)                                                        LT002
      ISV36 = IFIX(SV(36)) + 1                                           LT002
      LSEC = IFIX(V(9))                                                  TRAJB
      L = IFIX(W(8))                                                     TRAJB
      N = 12                                                             TRAJB
      IFLAG = 0                                                          TRAJB
      W(9)  = W(9)  + 1.                                                 TRAJB
      W(10) = W(10) + 1.                                                 TRAJB
      IF(KA.LE.1) GO TO 40                                               TRAJB
      IF(KA.EQ.ISV36) GO TO 73                                           LT002
      T = ST                                                             TRAJB
C  ****  INITIALIZATION FOR SUBSEQUENT TRAJECTORY SEGMENTS  ****         TRAJB
      DO 41 K=1,100                                                      LT002
   41 Z(K) = ZS(K)                                                       TRAJB
      DO 43 K=1,7                                                        TRAJB
   43 Y(K) = Z(K)                                                        TRAJB
      DO 44 K=1,4                                                        TRAJB
   44 Y(K+7) = Z(K+16)                                                   TRAJB
      Y(12) = Z(39)                                                      TRAJB
      GO TO 42                                                           TRAJB
C  ****  INITIALIZATION FOR THE FIRST TRAJECTORY SEGMENT  ****           TRAJB
   40 T = V(51)                                                          TRAJB
      SE(9) = 0.                                                         TRAJB
      DO 11 K=1,6                                                        TRAJB
   11 Y(K) = V(K)                                                        TRAJB
      Y(7) = V(7) + V(10)                                                TRAJB
      DO 10 K=1,5                                                        TRAJB
   10 Y(K+7) = 0.                                                        TRAJB
      Z(43) = V(60)                                                      TRAJB
      Z(11) = V(61)                                                      TRAJB
      Z(12) = V(62)                                                      TRAJB
      Z(13) = V(63)                                                      TRAJB
      GO TO 42                                                           LT002
C  ****  INITIALIZATION FOR THE BOOSTER RETURN FLIGHT  ****              LT002
   73 T = SW(20)                                                         LT002
      SV(42) = 0.                                                        LT002
      Z(1)  = SV(37)                                                     LT002
      Z(2)  = SV(8)                                                      LT002
      Z(3)  = SV(10)                                                     LT002
      Z(4)  = SV(31)                                                     LT002
      Z(5)  = SV(32)                                                     LT002
      Z(6)  = SV(33)                                                     LT002
      Z(7)  = SV(34)                                                     LT002
      Z(8)  = SV(9)                                                      LT002
      Z(11) = SV(38)                                                     LT002
      Z(12) = SV(39)                                                     LT002
      Z(13) = SV(40)                                                     LT002
      Z(43) = SV(41)                                                     LT002
      DO 74 K=1,7                                                        LT002
   74 Y(K) = Z(K)                                                        LT002
      DO 75 K=8,12                                                       LT002
   75 Y(K) = 0.                                                          LT002
   42 X = T                                                              TRAJB
      DO 28 I=1,4                                                        TRAJB
   28 NUM(I) = IFIX(W(I+8))                                              TRAJB
      DO 12 NSEC=KA,KB                                                   TRAJB
      DO 13 K=1,6                                                        TRAJB
   13 W(K) = .1                                                          TRAJB
      DO 200 M=1,5                                                       LT002
      XW3(M) = .1                                                        TRAJB
  200 XW4(M) = .1                                                        TRAJB
C  ****  PRINT OUTPUT HEADERS  ****                                      TRAJB
      IF(NSEC.EQ.KA) GO TO 26                                            TRAJB
      IF(V(66).LT..5.AND.W(7).LT..5) GO TO 50                            TRAJB
      IF(SW(2).NE.1..AND.SQ(1,2).EQ.0.) GO TO 22                         LT002
      IF(NSEC-ISV36) 76, 77, 76                                          LT002
   76 WRITE(6,1007) NSEC                                                 LT002
      GO TO 22                                                           LT002
   77 WRITE(6,1023) NSEC                                                 LT002
      GO TO 22                                                           TRAJB
   50 IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              TRAJB
     1WRITE(6,1017) NSEC                                                 TRAJB
      GO TO 29                                                           TRAJB
   26 IARG = L + 1                                                       TRAJB
      IF(SQ(1,2).NE.0.) GO TO 90                                         TRAJB
      IF(SW(2).NE.1.) GO TO 100                                          TRAJB
   90 GO TO (27,19,20,21), IARG                                          TRAJB
   19 WRITE(6,1003) CV(1)                                                TRAJB
      GO TO 18                                                           TRAJB
   20 WRITE(6,1004) CV(1), CV(2)                                         TRAJB
      GO TO 18                                                           TRAJB
   21 WRITE(6,1005) CV(1), CV(2), CV(3)                                  TRAJB
   18 IF(V(68).GT..5) WRITE(6,1012) W(34), W(19)                         TRAJB
      WRITE(6,1006) NUM(1), NUM(2), NUM(3), NUM(4), NSEC, V(10)          TRAJB
  100 IF(ABS(Q(33,KA)-19.5).GT.2.) GO TO 22                              TRAJB
      WW(1) = T                                                          TRAJB
      WW(5) = FLOAT(KA) + .1                                             TRAJB
      GO TO (96,96,97,83), IARG                                          TRAJB
   97 IF(W(9).GT.1.5) GO TO 22                                           TRAJB
   96 WW(2) = -Q(37,KA)                                                  TRAJB
      IF(WW(2).LT.0.) WW(2) = WW(1) - WW(2)                              TRAJB
      GO TO 22                                                           TRAJB
   83 IF(Q(22,KB).LT.-.5) GO TO 84                                       TRAJB
      WW(2) = WW(1)                                                      TRAJB
      DO 85 K=KA,KB                                                      TRAJB
   85 WW(2) = WW(2) + Q(23,K)                                            TRAJB
      GO TO 22                                                           TRAJB
   84 WW(2) = Q(23,KB)                                                   TRAJB
      GO TO 22                                                           TRAJB
   27 IF(NSEC-ISV36) 78, 79, 78                                          LT002
   78 WRITE(6,1011) NSEC, V(10)                                          LT002
      GO TO 22                                                           LT002
   79 WRITE(6,1024) NSEC, V(10)                                          LT002
   22 IF(V(66).LT..5.AND.W(7).LT..5) GO TO 54                            LT002
      IF(SW(2).NE.1..AND.SQ(1,2).EQ.0.) GO TO 54                         LT002
      WRITE(6,1001)                                                      LT002
      JSND = 1 + IFIX(Q(69,NSEC))                                        LT002
      GO TO (67,68,69,70), JSND                                          LT002
   68 WRITE(6,1019)                                                      LT002
      GO TO 67                                                           LT002
   69 WRITE(6,1020)                                                      LT002
      GO TO 67                                                           LT002
   70 WRITE(6,1022)                                                      LT002
   67 IF(Q(56,NSEC).LT..5) GO TO 71                                      LT002
      WRITE(6,1016)                                                      LT002
      IF(Q(56,NSEC).GT.1.5) GO TO 72                                     LT002
      WRITE(6,1015)                                                      LT002
      GO TO 71                                                           LT002
   72 WRITE(6,1021)                                                      LT002
   71 JSND = 1 + IFIX(V(56))                                             LT002
      GO TO (51,52,52,53,53), JSND                                       LT002
   52 WRITE(6,1013)                                                      LT002
      GO TO 32                                                           LT002
   53 WRITE(6,1014)                                                      LT002
      GO TO 32                                                           LT002
   51 IF(SW(2).EQ.1..OR.SQ(1,2).NE.0.) WRITE(6,1015)                     LT002
      GO TO 29                                                           LT002
   54 IF(V(56).LT..5) GO TO 51                                           LT002
   32 IF(W(29).GT.900.) V(75) = V(4)                                     TRAJB
      ARG = (180. - V(75))/V(45)                                         TRAJB
      W(27) = SIN(ARG)                                                   TRAJB
      W(28) = COS(ARG)                                                   TRAJB
   29 TS(NSEC) = X                                                       TRAJB
      PS(NSEC) = Z(43)                                                   LT002
C  ****  TRAJECTORY INTEGRATION  ****                                    TRAJB
      CALL INTGRT(X,Y,N)                                                 TRAJB
      IF(N.LE.0) GO TO 15                                                TRAJB
      DO 14 K=1,3                                                        TRAJB
      IEC(K) = IFIX(V(K+19))                                             TRAJB
C  ****  DETERMINATION OF ITERATION END CONDITIONS  ****                 TRAJB
      IF(IEC(K).EQ.NSEC) CALL ENDCN(K)                                   TRAJB
   14 CONTINUE                                                           TRAJB
      IF(ABS(Q(26,NSEC)).LT..00001) GO TO 60                             TRAJB
C  ****  JETTISON WEIGHT  ****                                           TRAJB
      ARG1 = Y(7)                                                        TRAJB
      IF(Q(26,NSEC).LT.0.) GO TO 16                                      TRAJB
      Y(7) = Y(7) - Q(26,NSEC)                                           TRAJB
      ARG2 = Q(26,NSEC)                                                  TRAJB
      GO TO 17                                                           TRAJB
   16 Y(7) = V(10) - Q(26,NSEC)                                          TRAJB
      ARG2 = ARG1 - Y(7)                                                 TRAJB
   17 IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              TRAJB
     1WRITE(6,1002) ARG1, ARG2, Y(7)                                     TRAJB
      Z(7) = Y(7)                                                        TRAJB
   60 IF(Q(67,NSEC).LT..5) GO TO 80                                      TRAJB
C  ****  RESET IDEAL VELOCITY  ****                                      TRAJB
      IVEL = IFIX(Q(67,NSEC))                                            TRAJB
      GO TO (61,62,63,64,62,61), IVEL                                    TRAJB
   62 Y(9)  = 0.                                                         TRAJB
      Y(10) = 0.                                                         TRAJB
      Y(11) = 0.                                                         TRAJB
      IF(IVEL.EQ.5) GO TO 63                                             TRAJB
   61 Y(8) = Q(68,NSEC)                                                  TRAJB
      GO TO 65                                                           TRAJB
   64 Y(9)  = Y(9)  + Q(68,NSEC)                                         TRAJB
      Y(10) = Y(10) + Q(68,NSEC)                                         TRAJB
      Y(11) = Y(11) + Q(68,NSEC)                                         TRAJB
   63 Y(8)  = Y(8)  + Q(68,NSEC)                                         TRAJB
   65 ARG = Y(8) - Z(17)                                                 TRAJB
      WRITE(6,1018) Z(17), ARG, Y(8)                                     TRAJB
      DO 66 J=1,4                                                        LT002
   66 Z(J+16) = Y(J+7)                                                   LT002
   80 JEC = 3                                                            TRAJB
      LEC = IFIX(SV(36))                                                 LT002
      KEC = IFIX(V(74))                                                  TRAJB
      IF(NSEC.EQ.2) SQ(37,1) = T                                         EMS3
      IF(NSEC.EQ.4) SQ(37,3) = T                                         EMS3
      IF(KEC.LE.0) KEC = LEC                                             TRAJB
      IF (NSEC.NE.3) GO TO 82                                            TRAJB
      SV(8) = Z(2)                                                       TRAJB
      SV(9) = Z(8)                                                       TRAJB
      SV(10)= Z(3)                                                       TRAJB
      SV(12) = Z(9)                                                      TRAJB
      SV(31) = Z(4)                                                      LT002
      SV(32) = Z(5)                                                      LT002
      SV(33) = Z(6)                                                      LT002
      SV(37) = Z(1)                                                      LT002
      SV(38) = Z(11)                                                     LT002
      SV(39) = Z(12)                                                     LT002
      SV(40) = Z(13)                                                     LT002
      SV(41) = Z(14)                                                     LT002
      SW(20) = T                                                         TRAJB
      SW(10) = Z(49)                                                     TRAJB
      SQ(12,1) = Z(89)                                                   TRAJB
      SQ(14,1) = Z(17)                                                   TRAJB
      SQ(36,1) = Z(19)                                                   EMS3
      SQ(36,2) = Z(18)                                                   EMS3
   82 IF(NSEC.NE.KEC) GO TO 81                                           TRAJB
      SV(3) = Z(17)                                                      TRAJB
   81 IF(NSEC.NE.LEC) GO TO 12                                           TRAJB
      SV(4) = Z(7)                                                       TRAJB
      SV(7) = -Q(26,3)                                                   TRAJB
      SV(5) = SV(7) - SV(4)                                              TRAJB
      SV(6) = SV(7)/SV(4)                                                TRAJB
      SQ(14,2) = Z(17)                                                   JDA6
      SQ(14,4) = Z(41)                                                   JDA6
      SQ(14,5) = Z(8)                                                    JDA6
      SQ(15,3) = Z(42)                                                   JDA6
      SQ(15,4) = Z(66)                                                   JDA6
      SQ(36,3) = Z(19)                                                   EMS3
      SQ(36,4) = Z(18)                                                   EMS3
      SQ(36,5) = Z(20)                                                   EMS3
      SQ(37,2) = T - SQ(37,3)                                            EMS3
   12 CONTINUE                                                           TRAJB
      IF(NSEC.LT.LSEC) GO TO 101                                         LT002
      IF(V(66).LT..5.AND.W(7).LT..5) GO TO 101                           LT002
      IF(SW(2).NE.1..AND.SQ(1,2).EQ.0.) GO TO 101                        LT002

      IF(SQ(19,5).EQ.5.) WRITE(6,1025) SV(42)                            WDH4
  101 IF(ABS(Q(33,KB)-19.5).GT.2..OR.ABS(W(8)-2.).GT..5) GO TO 95        LT002
      IF(W(9).LT.Q(37,KB)+.5) GO TO 95                                   LT002
      DO 93 K=1,2                                                        LT002
      IF(ABS(EC(K)-V(K+51)).GT.V(K+31)) GO TO 94                         LT002
   93 CONTINUE                                                           LT002
      GO TO 95                                                           LT002
   94 CONTINUE                                                           LT002
C  94 WW(2) = T     (DELETED HERE)                                       LT002
   95 IF(W(7).LT..5) GO TO 45                                            TRAJB
C  ****  SAVE END CONDITIONS FOR SUBSEQUENT TRAJECTORY SEGMENTS  ****    TRAJB
      ST = T                                                             TRAJB
      DO 46 K=1,100                                                      LT002
   46 ZS(K) = Z(K)                                                       TRAJB
   45 IF(SW(16).NE.0.) GO TO 92                                          TRAJB
      IF(SQ(1,2).EQ.1.) GO TO 92                                         TRAJB
      RETURN                                                             TRAJB
   92 GO TO (999,23,24,25), IARG                                         TRAJB
   15 IFLAG = 1                                                          TRAJB
      N = 12                                                             TRAJB
      GO TO 999                                                          TRAJB
C  ****  PRINT END CONDIONS  ****                                        TRAJB
   23 WRITE(6,1008) EC(1)                                                TRAJB
      GO TO 999                                                          TRAJB
   24 WRITE(6,1009) EC(1), EC(2)                                         TRAJB
      GO TO 999                                                          TRAJB
   25 WRITE(6,1010) EC(1), EC(2), EC(3)                                  TRAJB
  999 RETURN                                                             TRAJB
      END                                                                TRAJB
  ELT EQTNL,1,710302, 33662
  EOF "                                                                        "
      SUBROUTINE EQTNL(X,Y,F,H,IFLAG)                                    EQTNL
      REAL LBW, LBX, LBY, LBZ                                            EQTNL
      DIMENSION Y(12), P(4), PP(4), F(12)                                EQTNL
      DIMENSION ZP(3)                                                    EQTNL
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/AERO/ZP21,ZP22,ZP23                                         EQTNL
 1001 FORMAT(92H0   *****   EXCEEDED MAXIMUM NUMBER OF ITERATION IN DETE EQTNL
     1RMINATION OF IMPACT LATITUDE   *****/)                             EQTNL
 1002 FORMAT(70H0   *****   IMPACT CONDITIONS ARE INVARIANT TO IMPACT LA EQTNL
     1TITUDE   *****/)                                                   EQTNL
 1003 FORMAT(61H0   *****   PREDICTED IMPACT LATITUDE EXCEEDED LIMITS    EQTNL
     1*****/)                                                            EQTNL
 1004 FORMAT(5X,14H IMPACT LAT(2),6X,14H IMPACT LAT(1),6X,13H DELTA LAT( EQTNL
     12),7X,13H DELTA LAT(1),7X,14H IMPACT RADIUS,6X,10H ITERATION//5E20 EQTNL
     2.8,8X,I3////)                                                      EQTNL
 1005 FORMAT(92H0  ****  FAILURE TO PLACE AZIMUTH TO TARGET POINT WITHIN LT002
     1 180 DEG OF AZIMUTH IN EQTNL  ****//)                              LT002
      IEQ = 0                                                            EQTNL
      IALF = 1                                                           EQTNL
      JALF = 0                                                           EQTNL
      TEST1 = .0000001                                                   LT002
      TEST2 = .9999999                                                   LT002
      TEST3 = .00005                                                     LT002
C  ****  STATE VARIABLES  ****                                           EQTNL
      T = X                                                              EQTNL
      DO 10 I=1,7                                                        EQTNL
   10 Z(I) = Y(I)                                                        EQTNL
      DO 61 I=1,4                                                        EQTNL
   61 Z(I+16) = Y(I+7)                                                   EQTNL
      Z(39) = Y(12)                                                      EQTNL
C  ****  NECESSARY Z PARAMETERS  ****                                    EQTNL
      ARG3 = Z(3)/V(45)                                                  EQTNL
      SIN3 = SIN(ARG3)                                                   EQTNL
      COS3 = COS(ARG3)                                                   EQTNL
      ARG4 = Z(4)/V(45)                                                  EQTNL
      SIN4 = SIN(ARG4)                                                   EQTNL
      COS4 = COS(ARG4)                                                   EQTNL
      ARG5 = Z(5)/V(45)                                                  EQTNL
      SIN5 = SIN(ARG5)                                                   EQTNL
      COS5 = COS(ARG5)                                                   EQTNL
      TAN5 = TAN(ARG5)                                                   EQTNL
      ARG6 = Z(6)/V(45)                                                  EQTNL
      SIN6 = SIN(ARG6)                                                   EQTNL
      COS6 = COS(ARG6)                                                   EQTNL
      WE   = V(37)/V(45)                                                 EQTNL
      WE2  = WE*WE                                                       EQTNL
      TR = T - TS(NSEC)                                                  EQTNL
      W(32) = .1                                                         EQTNL
C  ****  ROLL, PITCH, AND YAW ANGLES  ****                               EQTNL
      IF(IFLAG.LT.2) GO TO 146                                           EQTNL
      IPSIF = IFIX(Q(33,NSEC))                                           EQTNL
      PSARG = Z(43)                                                      EQTNL
      IF(IPSIF.EQ.7) Z(12) = Q(45,NSEC)                                  EQTNL
  146 CALL ANGLE                                                         EQTNL
C  ****  EARTH RADIUS GEOMETRY  ****                                     EQTNL
      IF(ABS(V(49)-V(50)).LT.1.) GO TO 11                                EQTNL
      IF(ABS(Z(5)).LT.TEST1) GO TO 11                                    LT002
      Z(14) = 1./SQRT((COS5/V(49))**2 + (SIN5/V(50))**2)                 EQTNL
      ISURF = 1                                                          EQTNL
      GO TO 12                                                           EQTNL
   11 Z(14) = V(49)                                                      EQTNL
      ISURF = 0                                                          EQTNL
   12 Z(8) = Z(1) - Z(14)                                                EQTNL
C  **** GRAVITY FOR ASPHERICAL GRAVITATIONAL FIELD  ****                 EQTNL
      Z(15) = V(36)/(Z(1)*Z(1))                                          EQTNL
      DO 14 I=38,40,1                                                    EQTNL
      IF(ABS(V(I)).GE.TEST1) GO TO 15                                    LT002
   14 CONTINUE                                                           EQTNL
   16 Z(16) = 0.                                                         EQTNL
      Z(10) = Z(15)                                                      EQTNL
      GO TO 18                                                           EQTNL
   15 IF(ABS(Z(5)).LE.TEST1) GO TO 16                                    LT002
      SINS5 = SIN5*SIN5                                                  EQTNL
      P(2) = -4.5*SINS5 + 1.5                                            EQTNL
      P(3) = SIN5*(6. - 10.*SINS5)                                       EQTNL
      P(4) = -21.875*SINS5*SINS5 + 18.75*SINS5 - 1.875                   EQTNL
      PP(2) = -3.*SIN5                                                   EQTNL
      PP(3) = -7.5*SINS5 + 1.5                                           EQTNL
      PP(4) = SIN5*(7.5 - 17.5*SINS5)                                    EQTNL
      ARG0 = V(49)/Z(1)                                                  EQTNL
      ARG1 = 0.                                                          EQTNL
      ARG2 = 0.                                                          EQTNL
      DO 17 I=2,4,1                                                      EQTNL
      ARGN = ARG0**I                                                     EQTNL
      ARG1 = ARG1 + V(I+36)*P(I)*ARGN                                    EQTNL
   17 ARG2 = ARG2 + V(I+36)*PP(I)*ARGN                                   EQTNL
      Z(16) = Z(15)*ARG2*COS5                                            EQTNL
      Z(15) = Z(15)*(1. + ARG1)                                          EQTNL
      Z(10) = SQRT(Z(15)*Z(15) + Z(16)*Z(16))                            EQTNL
C  ****  ATMOSPHERE  ****                                                EQTNL
   18 IF(Z(8).GE.V(47).OR.Q(27,NSEC).LT..5) GO TO 19                     EQTNL
      CALL ATMOS                                                         EQTNL
      IF(W(32).GT..5) GO TO 19                                           EQTNL
      Z(40) = Z(2)/Z(37)                                                 EQTNL
      Z(9) = 100.8*Z(36)*Z(40)*Z(40)                                     EQTNL
      IF(Z(9).GT.SE(9).AND.NSEC.LE.3) GO TO 8                            LT002
      GO TO 13                                                           EQTNL
    8 SE(9) = Z(9)                                                       EQTNL
      SQ(5,1) = T                                                        EQTNL
      SQ(6,1) = Z(8)                                                     EQTNL
      SQ(7,1) = Z(2)                                                     EQTNL
      SQ(8,1) = Z(3)                                                     EQTNL
      SQ(9,1) = Z(40)                                                    EQTNL
      GO TO 13                                                           EQTNL
   19 Z(9)  = 0.                                                         EQTNL
      Z(21) = 0.                                                         EQTNL
      Z(22) = 0.                                                         EQTNL
      Z(23) = 0.                                                         EQTNL
      Z(24) = 0.                                                         EQTNL
      Z(25) = 0.                                                         EQTNL
      Z(26) = 0.                                                         EQTNL
      Z(29) = 0.                                                         EQTNL
      Z(30) = 0.                                                         EQTNL
      Z(31) = 0.                                                         EQTNL
      Z(34) = 0.                                                         EQTNL
      Z(36) = 0.                                                         EQTNL
      Z(37) = 0.                                                         EQTNL
      Z(40) = 0.                                                         EQTNL
      GO TO 21                                                           EQTNL
C  ****  AERODYNAMIC COMPUTATIONS  ****                                  LT002
   13 IF(NSEC.GE.4) GO TO 201                                            LT002
C  ****  COMBINED VEHICLE AERODYNAMICS  ****                             LT002
      DO 20 I = 1,3                                                      EQTNL
      L = 1                                                              EQTNL
      GO TO (22,23,24), I                                                EQTNL
   22 Z(21) = 0.                                                         EQTNL
      GO TO 36                                                           EQTNL
   23 CALL AERO2(L)                                                      EQTNL
      GO TO 36                                                           EQTNL
   24 CALL AERO3(L)                                                      EQTNL
   36 Z(I+23) = Z(I+20)*Q(I+3,NSEC)*Z(9)                                 EQTNL
   20 CONTINUE                                                           EQTNL
      DO 200 I = 1,3                                                     EQTNL
      L = 2                                                              EQTNL
      GO TO (222,223,224), I                                             EQTNL
  222 Z(21) = 0.                                                         EQTNL
      GO TO 236                                                          EQTNL
  223 CALL AERO2(L)                                                      EQTNL
      GO TO 236                                                          EQTNL
  224 CALL AERO3(L)                                                      EQTNL
  236 IEQ = 1                                                            EQTNL
      Z(I+23) = Z(I+23) + Z(I+20)*Z(9)*Q(I+3,NSEC+3)                     EQTNL
      Z(I+28) = Z(I+23)/Z(7)                                             EQTNL
      IF(I.GT.2) Z(34) = SQRT(Z(29)*Z(29) + Z(30)*Z(30) + Z(31)*Z(31))   EQTNL
      IF(Z(9)*Q(I+3,NSEC).EQ.0.) ZP(I) = 0.                              EQTNL
      IF(Z(9)*Q(I+3,NSEC).EQ.0.) GO TO 200                               EQTNL
      ZP(I)  =  Z(I+23)/(Z(9)*Q(I+3,NSEC))                               EQTNL
  200 CONTINUE                                                           EQTNL
      ZP21 = ZP(1)                                                       EQTNL
      ZP22 = ZP(2)                                                       EQTNL
      ZP23 = ZP(3)                                                       EQTNL
      GO TO 21                                                           LT002
C  ****  SINGLE VEHICLE AERODYNAMICS  ****                               LT002
  201 DO 300 I=1,3                                                       LT002
      IF(SV(35).GT.1.5) GO TO 301                                        LT002
      L = 3                                                              LT002
      GO TO 302                                                          LT002
  301 IF(Q(I+27,NSEC).GT..5) GO TO 304                                   LT002
      Z(I+20) = 0.                                                       LT002
      Z(I+23) = 0.                                                       LT002
      Z(I+28) = 0.                                                       LT002
      GO TO 303                                                          LT002
  304 L = IFIX(Q(I+27,NSEC))                                             LT002
  302 GO TO (322,323,324), I                                             MSCC
  322 Z(21) = 0.                                                         EQTNL
      GO TO 336                                                          EQTNL
  323 CALL AERO2(L)                                                      EQTNL
      GO TO 336                                                          EQTNL
  324 CALL AERO3(L)                                                      EQTNL
  336 IEQ = 1                                                            EQTNL
      Z(I+23) = Z(I+20)*Q(I+3,NSEC)*Z(9)                                 EQTNL
      Z(I+28) = Z(I+23)/Z(7)                                             EQTNL
  303 IF(I.GT.2) Z(34) = SQRT(Z(29)*Z(29) + Z(30)*Z(30) + Z(31)*Z(31))   LT002
  300 CONTINUE                                                           EQTNL
      ZP21 = Z(21)                                                       EQTNL
      ZP22 = Z(22)                                                       EQTNL
      ZP23  = Z(23)                                                      EQTNL
C  ****  PROPULSION AND TIME RATE OF CHANGE IN WEIGHT  ****              EQTNL
   21 IF(Q(31,NSEC).GT..5) GO TO 70                                      EQTNL
      Z(27) = 0.                                                         EQTNL
      Z(32) = 0.                                                         EQTNL
      Z(47) = Q(3,NSEC)                                                  EQTNL
      Z(48) = 0.                                                         EQTNL
      GO TO 71                                                           EQTNL
   70 CALL PRPSN                                                         EQTNL
      Z(32) = Z(27)/Z(7)                                                 EQTNL
   71 Z(28) = Z(27) + Z(25)                                              EQTNL
      Z(33) = Z(28)/Z(7)                                                 EQTNL
      Z(35) = SQRT(Z(29)*Z(29) + Z(33)*Z(33) + Z(31)*Z(31))              EQTNL
      IF(SV(35).LE.1.6) GO TO 204                                        LT002
      IF(Z(35).LT.SV(42)) GO TO 204                                      LT002
      SV(42) = Z(35)                                                     LT002
C  ****  APPLIED FORCES  ****                                            EQTNL
  204 IF(Q(31,NSEC).GT..5) GO TO 72                                      LT002
      IF(IEQ.GT.0) GO TO 72                                              EQTNL
      Z(44) = 0.                                                         EQTNL
      Z(45) = 0.                                                         EQTNL
      Z(46) = 0.                                                         EQTNL
      GO TO 26                                                           EQTNL
   72 ARG8 = Z(12)/V(45)                                                 EQTNL
      SIN8 = SIN(ARG8)                                                   EQTNL
      COS8 = COS(ARG8)                                                   EQTNL
      IF(IPSIF.EQ.7) GO TO 101                                           EQTNL
      IF(Q(32,NSEC).LT.2.5) GO TO 100                                    EQTNL
C  ****  TRANSITION FLIGHT BY ROLL-OUT CONTROL  ****                     EQTNL
      IF(IEQ.LT.1.OR.Z(8).GE.V(47)) GO TO 91                             EQTNL
      ARG = SIN8*Z(28) - COS8*Z(26)                                      EQTNL
      IF(ABS(ARG).LT.TEST1) GO TO 91                                     LT002
      FGAM = Z(7)*(Z(16)*SIN3*COS4 + Z(15)*COS3 - 2.*WE*Z(2)*SIN4*COS5 - EQTNL
     1 WE2*Z(1)*COS5*(COS3*COS5 + SIN3*COS4*SIN5) + Z(2)*(Q(52,NSEC)/V(4 EQTNL
     25) - Z(2)*COS3/Z(1)))/V(35)                                        EQTNL
      ARG = FGAM/ARG                                                     EQTNL
      CALL QARG(ARG,Z(11),2,0)                                           LT002
      Z(11) = Q(36,NSEC)*Z(11)                                           LT002
      IF(ABS(Z(11)).GT.180.-TEST1) GO TO 90                              LT002
      IF(Q(36,NSEC).LT.0.) GO TO 94                                      LT002
      IF(Z(11).LE.Q(44,NSEC)) GO TO 91                                   EQTNL
      GO TO 90                                                           EQTNL
   94 IF(Z(11).LT.Q(44,NSEC)) GO TO 90                                   EQTNL
   91 Z(11) = Q(44,NSEC)                                                 EQTNL
   90 CALL ANGLE                                                         EQTNL
      GO TO 100                                                          EQTNL
C  ****  TRANSITION FLIGHT BY PITCH ANGLE OF ATTACK CONTROL  ****        EQTNL
  101 IF(JALF.GT.0) GO TO 102                                            EQTNL
      IF(IALF.GT.1) GO TO 104                                            EQTNL
      FGAM = Z(7)*(Z(16)*SIN3*COS4 + Z(15)*COS3 - 2.*WE*Z(2)*SIN4*COS5 - EQTNL
     1 WE2*Z(1)*COS5*(COS3*COS5 + SIN3*COS4*SIN5) + Z(2)*(Q(52,NSEC)/V(4 EQTNL
     25) - Z(2)*COS3/Z(1)))/V(35)                                        EQTNL
      ARG7 = Z(11)/V(45)                                                 EQTNL
      COS7 = COS(ARG7)                                                   EQTNL
  104 ARG = COS7*(SIN8*Z(28) - COS8*Z(26))                               EQTNL
      Y3 = FGAM - ARG                                                    EQTNL
      IF(ABS(Y3).LE.Q(14,NSEC)) GO TO 102                                EQTNL
      IF(IALF-2) 106,113,116                                             EQTNL
  116 IF(ABS(Y1).LT.ABS(Y2)) GO TO 107                                   EQTNL
      X1 = X2                                                            EQTNL
      Y1 = Y2                                                            EQTNL
  107 X2 = X3                                                            EQTNL
  113 Y2 = Y3                                                            EQTNL
  114 X3 = X1 - Y1*(X2 - X1)/(Y2 - Y1)                                   EQTNL
      Z(12) = X3                                                         EQTNL
      GO TO 108                                                          EQTNL
  106 X1 = Z(12)                                                         EQTNL
      Y1 = Y3                                                            EQTNL
      X2 = X1 + Q(37,NSEC)                                               EQTNL
      Z(12) = X2                                                         EQTNL
  108 IALF = IALF + 1                                                    EQTNL
      IF(Z(12).LE.Q(35,NSEC)) GO TO 109                                  EQTNL
      IF(Z(12).GE.Q(43,NSEC)) GO TO 110                                  EQTNL
      IF(IALF-15) 105,105,115                                            EQTNL
  110 Z(12) = Q(43,NSEC)                                                 EQTNL
      GO TO 111                                                          EQTNL
  115 JALF = 1                                                           EQTNL
      GO TO 105                                                          EQTNL
  109 Z(12) = Q(35,NSEC)                                                 EQTNL
  111 JALF = 1                                                           EQTNL
  105 IF(IEQ.LT.1.OR.Z(8).GT.V(47)) GO TO 72                             EQTNL
      GO TO 13                                                           EQTNL
  102 CALL ANGLE                                                         EQTNL
      GO TO 112                                                          EQTNL
  100 ARG7 = Z(11)/V(45)                                                 EQTNL
      COS7 = COS(ARG7)                                                   EQTNL
  112 SIN7 = SIN(ARG7)                                                   EQTNL
      ARG9 = Z(13)/V(45)                                                 EQTNL
      SIN9 = SIN(ARG9)                                                   EQTNL
      COS9 = COS(ARG9)                                                   EQTNL
      IF(IEQ.GT.0) GO TO 73                                              EQTNL
      Z(44) = (COS9*SIN8*SIN7 + SIN9*COS7)*Z(27)                         EQTNL
      Z(45) = COS9*COS8*Z(27)                                            EQTNL
      Z(46) = (-SIN9*SIN7 + COS9*SIN8*COS7)*Z(27)                        EQTNL
      GO TO 26                                                           EQTNL
   73 Z(44) = (COS9*COS7 - SIN9*SIN8*SIN7)*Z(24) + (COS9*SIN8*SIN7 + SIN EQTNL
     19*COS7)*Z(28) - COS8*SIN7*Z(26)                                    EQTNL
      Z(45) = -SIN9*COS8*Z(24) + COS9*COS8*Z(28) + SIN8*Z(26)            EQTNL
      Z(46) = (-SIN9*SIN8*COS7 - COS9*SIN7)*Z(24) + (-SIN9*SIN7 + COS9*S EQTNL
     1IN8*COS7)*Z(28) - COS8*COS7*Z(26)                                  EQTNL
C  ****  DIFFERENTIAL EQUATIONS (STATE EQUATIONS)  ****                  EQTNL
   26 F(1) = Z(2)*SIN3                                                   EQTNL
      F(2) = Z(16)*COS3*COS4 - Z(15)*SIN3 + Z(45)*V(35)/Z(7) + WE2*Z(1)* EQTNL
     1COS5*(SIN3*COS5 - COS3*COS4*SIN5)                                  EQTNL
      IF(ABS(Z(2)).LT.V(65)) GO TO 76                                    EQTNL
      ZARG = Z(2)                                                        EQTNL
      GO TO 77                                                           EQTNL
   76 ZARG = V(65)                                                       EQTNL
   77 F(3) = COS3*Z(2)/Z(1) + (Z(46)*V(35)/Z(7) + 2.*WE*Z(2)*SIN4*COS5 + EQTNL
     1 WE2*Z(1)*COS5*(COS3*COS5 + SIN3*COS4*SIN5) - Z(16)*SIN3*COS4 - Z( EQTNL
     215)*COS3)/ZARG                                                     EQTNL
      F(3) = F(3)*V(45)                                                  EQTNL
      IF(ABS(ABS(Z(3)) - 90.).LT.TEST3) GO TO 29                         LT002
      IF(ABS(ABS(Z(5)) - 90.).LT.TEST3) GO TO 30                         LT002
      IF(ABS(Z(3)).GT.V(41).OR.T.LT.V(42)) GO TO 33                      EQTNL
      F(4) = (Z(2)*Z(2)*COS3*COS3*SIN4*TAN5/Z(1) - Z(16)*SIN4 + Z(44)*V( EQTNL
     135)/Z(7) + 2.*WE*Z(2)*(COS3*SIN5 - SIN3*COS4*COS5) + WE2*Z(1)*SIN4 EQTNL
     2*SIN5*COS5)/(ZARG*COS3)                                            EQTNL
      F(4) = F(4)*V(45)                                                  EQTNL
   34 F(5) = Z(2)*COS3*COS4/Z(1)                                         EQTNL
      F(5) = F(5)*V(45)                                                  EQTNL
      F(6) = Z(2)*COS3*SIN4/(Z(1)*COS5)                                  EQTNL
      F(6) = F(6)*V(45)                                                  EQTNL
      GO TO 28                                                           EQTNL
   29 F(4) = 0.                                                          EQTNL
      F(5) = 0.                                                          EQTNL
      F(6) = 0.                                                          EQTNL
      GO TO 28                                                           EQTNL
   33 F(4) = 0.                                                          EQTNL
      GO TO 34                                                           EQTNL
   30 F(4) = 0.                                                          EQTNL
      F(5) = Z(2)*COS3*COS4/Z(1)                                         EQTNL
      F(5) = F(5)*V(45)                                                  EQTNL
      F(6) = 0.                                                          EQTNL
   28 IF(Q(27,NSEC).GT.1.5) Z(47) = Z(47)+2.*Z(23)*Z(9)*(Z(40)*(Q(57,NSE EQTNL
     1C)*Z(40)*Z(40) + Q(58,NSEC)*Z(40) + Q(59,NSEC)) + Q(60,NSEC))/Z(2) EQTNL
      F(7) = -Z(47)                                                      EQTNL
C  ****  IDEAL VELOCITY AND VELOCITY LOSSES  ****                        EQTNL
      IF(IEQ.LE.0) GO TO 74                                              EQTNL
      DRAG = Z(24)*SIN9*COS8 - Z(25)*COS9*COS8 - Z(26)*SIN8              EQTNL
      GO TO 75                                                           EQTNL
   74 DRAG = 0.                                                          EQTNL
   75 F(8)  = V(35)*Z(32)                                                EQTNL
      F(9)  = Z(15)*SIN3 - Z(16)*COS3*COS4                               EQTNL
      F(10) = V(35)*DRAG/Z(7)                                            EQTNL
      IF(Q(31,NSEC).GT..5) GO TO 37                                      EQTNL
      F(11) = 0.                                                         EQTNL
      GO TO 38                                                           EQTNL
   37 F(11) = V(35)*Z(32)*(1. - COS9*COS8)                               EQTNL
   38 F(12) = Z(2)*Z(9)                                                  EQTNL
      IARG = IFLAG + 1                                                   EQTNL
      GO TO (999,87,87), IARG                                            EQTNL
C  ****  AFTER THE FACT Z PARAMETERS  ****                               EQTNL
C  ****  EFFECTIVE PITCH RATE  ****                                      EQTNL
   87 GO TO (143,143,140,144,144,140,143,141,141,141,141,141,141,141,141 LT002
     1,141,141,143,143,143,143,143,143,143,143,143,143,143,143,143,143), LT002
     2 IPSIF                                                             LT002
  141 IF(W(31).LT..5) GO TO 140                                          LT002
  143 Z(78) = Z(43) - PSARG                                              LT002
      IF(IFLAG.GE.2) GO TO 140                                           LT002
      ARG = T - PTARG                                                    LT002
      IF(ABS(ARG).LT.TEST1) GO TO 144                                    LT002
      Z(78) = Z(78)/ARG                                                  LT002
      GO TO 140                                                          LT002
  144 Z(78) = 0.                                                         LT002
  140 PTARG = T                                                          LT002
      PSARG = Z(43)                                                      LT002
C  ****  HEAT FLUX  ****                                                 LT002
      Z(38) = F(12)                                                      LT002
C  ****  LOGARITHM TO THE BASE 10 OF THE DYNAMIC PRESSURE  ****          LT002
      ARG = Z(9)                                                         LT002
      IF(ARG.LE..001) ARG =  9.6*10.**(-ABS(Z(8)-260000.)/ 51000.)*((Z(2 LT002
     1) + 1.)/25800.)**2                                                 LT002
      Z(92) = ALOG10(ARG)                                                LT002
C  ****  INERTIAL VELOCITY AND FLIGHT PATH ANGLE  ****                   LT002
      VIX = Z(1)*WE*COS5 + Z(2)*COS3*SIN4                                LT002
      VIY = Z(2)*COS3*COS4                                               LT002
      VIZ = Z(2)*SIN3                                                    LT002
      Z(41) = SQRT(VIX*VIX + VIY*VIY + VIZ*VIZ)                          LT002
      IF(Z(41).LT.TEST1) Z(41) = TEST1                                   LT002
      ARG = VIZ/Z(41)                                                    LT002
      CALL QARG(ARG,Z(42),1,0)                                           LT002
C  ****  INERTIAL AZIMUTH  ****                                          LT002
   43 DRG = Z(41)*COS(Z(42)/V(45))                                       LT002
      IF(ABS(DRG).GE.TEST1) GO TO 121                                    LT002
      Z(65) = 0.                                                         LT002
      GO TO 120                                                          LT002
  121 COSBI = VIY/DRG                                                    LT002
      CALL QARG(COSBI,Z(65),2,0)                                         LT002
      IF(VIX.LT.0.) Z(65) = 360. - Z(65)                                 LT002
  120 IF(Q(56,NSEC).LT..5) GO TO 160                                     LT002
C  ****  ORBITAL ELEMENTS  ****                                          LT002
C  ****  CONIC ORBITAL PARAMETERS  ****                                  LT002
      Z(75) = Z(1)*SQRT(VIX*VIX + VIY*VIY)                               LT002
      Z(68) = Z(41)*Z(41) - 2.*V(36)/Z(1)                                LT002
      Z(72) = Z(68)*V(79)*V(79)                                          LT002
      Z(74) = (Z(75)/V(36))*Z(75)                                        LT002
      ARG = 1. + Z(74)*Z(68)/V(36)                                       LT002
      IF(ARG) 127, 127, 128                                              LT002
  128 Z(73) = SQRT(ARG)                                                  LT002
      GO TO 129                                                          LT002
  127 Z(73) = 0.                                                         LT002
      Z(69) = Z(41)                                                      LT002
      Z(76) = 0.                                                         LT002
      GO TO 125                                                          LT002
  129 Z(69) = SQRT(V(36)/Z(1))                                           LT002
      ARG = (Z(74)/Z(1) - 1.)/Z(73)                                      LT002
      CALL QARG(ARG,Z(76),2,0)                                           LT002
      IF(Z(42).LT.0.) Z(76) = 360. - Z(76)                               LT002
  125 IF(Z(68).GT.-.000001) GO TO 130                                    LT002
      XAX = -V(36)/Z(68)                                                 LT002
      Z(70) = XAX*(1.+ Z(73))                                            LT002
      ARG = V(36)*(1. - Z(73))/Z(70)                                     LT002
      IF(ARG.LT.TEST1) GO TO 131                                         LT002
      Z(71) = SQRT(ARG)                                                  LT002
      Z(77) = 2.*V(44)*XAX*SQRT(XAX/V(36))                               LT002
      GO TO 132                                                          LT002
  130 Z(70) = 0.                                                         LT002
  131 Z(71) = 0.                                                         LT002
      Z(77) = 0.                                                         LT002
C  ****  ORBITAL INCLINATION AND NODAL LONGITUDE  ****                   LT002
  132 IF(ABS(DRG).LT.TEST1) GO TO 41                                     LT002
      IF(ABS(COSBI).GT.TEST2) GO TO 42                                   LT002
      ARG = COS5*SIN(Z(65)/V(45))                                        LT002
      IF(ABS(ARG).GT.TEST2) GO TO 44                                     LT002
      Z(66) = V(45)*ACOS(ARG)                                            LT002
      ARG = COSBI/SIN(Z(66)/V(45))                                       LT002
      CALL QARG(ARG,ARG,2,0)                                             LT002
      IF(Z(66).GT.90.) GO TO 46                                          LT002
      IF(Z(5).LT.0.) GO TO 47                                            LT002
      Z(67) = Z(6) - ARG                                                 LT002
      GO TO 50                                                           LT002
   47 Z(67) = Z(6) + ARG                                                 LT002
      GO TO 50                                                           LT002
   46 IF(Z(5).LT.0.) GO TO 48                                            LT002
      Z(67) = Z(6) + ARG                                                 LT002
      GO TO 50                                                           LT002
   48 Z(67) = Z(6) - ARG                                                 LT002
   50 IF(Z(67).LT.0.) Z(67) = Z(67) + 360.                               LT002
      IF(Z(67).GT.360.) Z(67) = Z(67) - 360.                             LT002
      GO TO 149                                                          LT002
   44 IF(ARG) 51,52,52                                                   LT002
   51 Z(66) = 180.                                                       LT002
      GO TO 53                                                           LT002
   52 Z(66) = 0.                                                         LT002
   53 Z(67) = Z(6)                                                       LT002
      GO TO 149                                                          LT002
   41 Z(66) = Z(5)                                                       LT002
      Z(67) = Z(6)                                                       LT002
      GO TO 149                                                          LT002
   42 IF(COSBI) 57,63,63                                                 LT002
   57 Z(67) = Z(6) + 180.                                                LT002
      GO TO 64                                                           LT002
   63 Z(67) = Z(6)                                                       LT002
   64 Z(66) = 90.                                                        LT002
      GO TO 50                                                           LT002
  149 IF(ABS(COSBI).LE.TEST2) GO TO 133                                  LT002
      IF(COSBI.LT.0.) GO TO 134                                          LT002
      Z(91) = Z(5) - Z(76)                                               LT002
      GO TO 135                                                          LT002
  134 Z(91) = 180. - Z(5) - Z(76)                                        LT002
      GO TO 135                                                          LT002
  133 ARG = Z(67) - Z(6)                                                 LT002
      CALL QUAD(ARG,ARG,1,10)                                            LT002
      ARG = ARG/V(45)                                                    LT002
      ARG = COS5*COS(ARG)                                                LT002
      CALL QARG(ARG,ARG,2,0)                                             LT002
      IF(Z(5).GE.0.) ARG = 360. - ARG                                    LT002
      Z(91) = 360. - ARG - Z(76)                                         LT002
  135 IF(Q(65,NSEC).LE..5) CALL QUAD(Z(91),Z(91),1,10)                   LT002
      Z(96) = Z(74)/(1. + Z(73))                                         LT002
      ARG = SIN(Z(66)/V(45))*SIN(Z(91)/V(45))                            LT002
      CALL QARG(ARG,Z(97),1,0)                                           LT002
      Z(98) = -Z(97)                                                     LT002
      ARG2 = ARG*ARG                                                     LT002
      ARG1 = 1. - ARG2                                                   LT002
      REA = 1./SQRT(ARG1/(V(49)*V(49)) + ARG2/(V(50)*V(50)))             LT002
      Z(99) = Z(96) - REA                                                LT002
      IF(Z(68).GT.-.000001) GO TO 203                                    LT002
      Z(100) = Z(70) - REA                                               LT002
      GO TO 78                                                           LT002
  203 Z(100) = 0.                                                        LT002
   78 CONTINUE                                                           JDA6
C                                                                        JDA6
C                                                                        JDA6
C       OPTION FOR TARGETING ORBITER TO APOGEE,PERIGEE, TRUE ANOMALY     JDA6
C                                                                        JDA6
      IF(SQ(3,1).LE.0.) GO TO  88                                        JDA6
      RAT=REA + SQ(3,1)                                                  JDA61
      AT = REA + .5 * (SQ(3,1) + SQ(3,2) )                               JDA61
C       SQ(3,1) IS APOGEE ALT,  SQ(3,2) IS PERIGEE ALT                   JDA61
      ET = RAT/AT -1.                                                    JDA6
      RT = RAT*(1.-ET)/(1.+ET*SQ(3,4))                                   JDA6
      HT = RT - Z(14)                                                    JDA6
      SQRTK= SQRT(V(36))                                                 JDA6
      VT = SQRTK*SQRT(2./RT-1./AT)                                       JDA6
      VAT= SQRTK*SQRT(2./RAT-1./AT)                                      JDA6
      GAMT=ACOS (VAT*RAT/VT/RT ) *V(45)                                  JDA6
      IF(SQ(3,5).LT.0.) GAMT=-GAMT                                       JDA6
      Z(101)= Z( 8) - HT                                                 JDA6
      Z(102)= Z(42) - GAMT                                               JDA6
      Z(103)= Z(41) - VT                                                 JDA6
   88 CONTINUE                                                           JDA6
C       THE VARIABLES HT,GAMT,VT ARE TARGET VALUES DERIVED FROM THE      JDA6
C       INPUTS HANM, HPNM, TRANOM, AND THE CURRENT VALUE OF RE=Z(14).    JDA6
C       OPTION FOR TARGETING ORBITER TO APOGEE,PERIGEE, TRUE ANOMALY     JDA6
C                                                                        JDA6
C                                                                        JDA6
      IF(Q(56,NSEC).LT.1.5) GO TO 160                                    JDA6
C  ****  INSTANTANEOUS IMPACT POINT PREDICTION  ****                     LT002
      IF(Z(73).LT..0001.OR.Z(73).GT..9999.OR.Z(70).LT.V(50)) GO TO 161   LT002
      XRP = XAX*(1. - Z(73))                                             LT002
      IF(XRP.GT..999*V(50)) GO TO 161                                    LT002
      Z6 = Z(6)                                                          LT002
      IF(Q(65,NSEC).GT..5) CALL QUAD(Z6,Z6,1,10)                         LT002
      IF(ISURF.LT.1) GO TO 164                                           LT002
      IF(Q(56,NSEC).GT.2.5) GO TO 199                                    LT002
C  ****  ITERATION INITIALIZATION FOR OBLATE EARTH IMPACT LATITUDE  **** LT002
      JERR = 0                                                           LT002
      LCYC = 10                                                          LT002
      KCYC = 0                                                           LT002
      IF(IFLAG.EQ.2) Z(84) = SIGN(30.,Z(5))                              LT002
      Z84 = Z(84)                                                        LT002
  162 ARG1 = COS(Z(84)/V(45))                                            LT002
      ARG1 = ARG1*ARG1                                                   LT002
      ARG2 = 1. - ARG1                                                   LT002
      Z(86) = 1./SQRT(ARG1/(V(49)*V(49)) + ARG2/(V(50)*V(50)))           LT002
      KCYC = KCYC + 1                                                    LT002
      GO TO 163                                                          LT002
C  ****  SPHERICAL EARTH  ****                                           LT002
  199 Z(86) = V(1)                                                       LT002
      GO TO 163                                                          LT002
  164 Z(86) = V(49)                                                      LT002
C  ****  INITIAL CONIC ANALYSIS  ****                                    LT002
  163 ARG = Z(74)/Z(86)                                                  LT002
      ARG = (ARG - 1.)/Z(73)                                             LT002
      CALL QARG(ARG,Z(90),2,0)                                           LT002
      Z(90) = 360. - Z(90)                                               LT002
      Z(89) = Z(90) - Z(76)                                              LT002
      IF(ABS(Z(66)-90.).LT.TEST1.OR.ABS(Z(5)).GT.90.-TEST1) GO TO 166    LT002
C  ****  NON-POLAR INCLINATIONS  ****                                    LT002
      IF(Z(5).LT.0.) GO TO 167                                           LT002
C  ****  POSITIVE CURRENT LATITUDE  ****                                 LT002
      XKF2 = 1.                                                          LT002
      XPA = Z(67) - 180.                                                 LT002
      CALL QUAD(XPA,XPA,1,10)                                            LT002
  172 DPH = XPA - Z6                                                     LT002
      IF(Z(65).GE.180.) DPH = -DPH                                       LT002
      CALL QUAD(DPH,DPH,1,10)                                            LT002
      GO TO 169                                                          LT002
C  ****  NEGATIVE CURRENT LATITUDE  ****                                 LT002
  167 XKF2 = -1.                                                         LT002
      XPA = Z(67)                                                        LT002
      GO TO 172                                                          LT002
  169 ARG = COS5*COS(DPH/V(45))                                          LT002
      CALL QARG(ARG,XCC,2,0)                                             LT002
      ARG = XCC - Z(89)                                                  LT002
      IF(ARG.GE.0.) GO TO 174                                            LT002
      IF(ARG.LE.-180) GO TO 175                                          LT002
      XDD = -ARG                                                         LT002
      XKF1 = -1.                                                         LT002
      XKF3 = 1.                                                          LT002
      GO TO 176                                                          LT002
  174 XDD = ARG                                                          LT002
      XKF3 = 0.                                                          LT002
      GO TO 170                                                          LT002
  175 XDD = -ARG - 180.                                                  LT002
      XKF3 = 2.                                                          LT002
  170 XKF1 = 1.                                                          LT002
  176 ARG = XKF1*XKF2*SIN(Z(66)/V(45))*SIN(XDD/V(45))                    LT002
      CALL QARG(ARG,Z(84),1,0)                                           LT002
      GO TO 178                                                          LT002
C  ****  POLAR INCLINATION  ****                                         LT002
  166 IF(ABS(Z(65)-180.).LT.90.) GO TO 179                               LT002
C  ****  INERTIAL AZIMUTH IS 0 OR 360 DEG  ****                          LT002
      XKF1 = 1.                                                          LT002
      ARG1 = Z(5) + Z(89)                                                LT002
      GO TO 180                                                          LT002
C  ****  INERTIAL AZIMUTH IS 180 DEG  ****                               LT002
  179 XKF1 = -1.                                                         LT002
      ARG1 = Z(5) - Z(89)                                                LT002
  180 AARG1 = ABS(ARG1)                                                  LT002
      IF(AARG1.LT.90.) GO TO 181                                         LT002
      IF(AARG1.GE.270.) GO TO 182                                        LT002
      Z(84) = XKF1*180. - ARG1                                           LT002
      GO TO 178                                                          LT002
  181 Z(84) = ARG1                                                       LT002
      GO TO 178                                                          LT002
  182 Z(84) = ARG1 - XKF1*360.                                           LT002
  178 IF(ISURF.LT.1.OR.Q(56,NSEC).GT.2.5) GO TO 177                      LT002
C  ****  NEWTON-RAPHSON ITERATION FOR OBLATE EARTH IMPACT LATITUDE  **** LT002
      DZB84 = Z(84) - Z84                                                LT002
      IF(ABS(DZB84).LE.Q(19,NSEC)) GO TO 177                             LT002
      IF(KCYC.GT.LCYC) GO TO 183                                         LT002
      IF(KCYC-2) 187,187,184                                             LT002
  186 JERR = 1                                                           LT002
  187 Z84 = Z(84)                                                        LT002
      DZA84 = DZB84                                                      LT002
      GO TO 162                                                          LT002
  184 ARG = DZB84 - DZA84                                                LT002
      IF(ABS(ARG).GE.TEST1) GO TO 188                                    LT002
      IF(JERR) 186,186,185                                               LT002
  188 ARG = Z(84) - DZB84*DZB84/ARG                                      LT002
      Z84 = Z(84)                                                        LT002
      DZA84 = DZB84                                                      LT002
      Z(84) = ARG                                                        LT002
      IF(ABS(Z(84)).GT.100.) GO TO 189                                   LT002
      GO TO 162                                                          LT002
C  ****  EXCEEDED MAXIMUM NUMBER OF ITERATIONS  ****                     LT002
  183 WRITE(6,1001)                                                      LT002
      GO TO 190                                                          LT002
C  ****  IMPACT CONDITIONS ARE INVARIANT TO IMPACT LATITUDE  ****        LT002
  185 WRITE(6,1002)                                                      LT002
      GO TO 190                                                          LT002
C  ****  PREDICTED IMPACT LATITUDE EXCEEDED LIMITS  ****                 LT002
  189 WRITE(6,1003)                                                      LT002
  190 WRITE(6,1004) Z(84), Z84, DZB84, DZA84, Z(86), KCYC                LT002
C  ****  DETERMINATION OF IMPACT LONGITUDE FOR A NON-ROTATING CENTRAL BO LT002
  177 IF(ABS(Z(66)-90.).LT.TEST1.OR.ABS(Z(5)).GT.90.-TEST1) GO TO 191    LT002
C  ****  NON-POLAR INCLINATIONS  ****                                    LT002
      ARG1 = COS(XDD/V(45))                                              LT002
      ARG2 = COS(Z(84)/V(45))                                            LT002
      ARG = ARG1/ARG2                                                    LT002
      CALL QARG(ARG,ARG,2,0)                                             LT002
      IF(XKF3.LT..5) GO TO 192                                           LT002
      IF(XKF3.GT.1.5) GO TO 193                                          LT002
      GO TO 194                                                          LT002
  192 ARG = -ARG                                                         LT002
      GO TO 194                                                          LT002
  193 ARG = ARG + 180.                                                   LT002
  194 IF(Z(65).GT.180.) ARG = -ARG                                       LT002
      Z(88) = XPA + ARG                                                  LT002
      GO TO 195                                                          LT002
C  ****  POLAR INCLINATION  ****                                         LT002
  191 IF(AARG1.LT.90..OR.AARG1.GE.270.) GO TO 196                        LT002
      Z(88) = Z6 + 180.                                                  LT002
      GO TO 195                                                          LT002
  196 Z(88) = Z6                                                         LT002
      GO TO 197                                                          LT002
  195 CALL QUAD(Z(88),Z(88),1,10)                                        LT002
C  ****  DETERMINATION OF TIME TO IMPACT  ****                           LT002
  197 ARG = SQRT((1.-Z(73))/(1.+Z(73)))                                  LT002
      ARG1 = .5/V(45)                                                    LT002
      ARG2 = ARG*TAN(ARG1*Z(76))                                         LT002
      CALL QARG(ARG2,XE1,3,1)                                            LT002
      IF(XE1.LT.0.) XE1 = V(44) + XE1                                    LT002
      XE1 = 2.*XE1                                                       LT002
      ARG2 = ARG*TAN(ARG1*Z(90))                                         LT002
      CALL QARG(ARG2,XE2,3,1)                                            LT002
      IF(XE2.LT.0.) XE2 = V(44) + XE2                                    LT002
      XE2 = 2.*XE2                                                       LT002
      SINE1 = SIN(XE1)                                                   LT002
      SINE2 = SIN(XE2)                                                   LT002
      Z(87) = .5*(XE2 - XE1 - Z(73)*(SINE2 - SINE1))*Z(77)/V(44)         LT002
C  ****  DETERMINATION OF IMPACT LONGITUDE FOR A ROTATING CENTRAL BODY   LT002
      Z(85) = Z(88) - V(37)*Z(87)                                        LT002
      CALL QUAD(Z(85),Z(85),1,10)                                        LT002
      GO TO 160                                                          LT002
  161 DO 198 I=1,7                                                       LT002
  198 Z(I+83) = 0.                                                       LT002
  160 IF(V(56).LT..5) GO TO 60                                           LT002
      IF(V(56).GT.2.5) GO TO 40                                          LT002
C  ****  TRANSFORMATIONS FOR INPUT COMPATIBILITY WITH GEMBET AND TSOP PR LT002
      CALL TRAN1(0.,Z(2),0.,SIN3,COS3,SIN4,COS4,V1,V2,V3)                LT002
      ARG = V(35)/Z(7)                                                   LT002
      AX = ARG*Z(44)                                                     LT002
      AY = ARG*Z(45)                                                     LT002
      AZ = ARG*Z(46)                                                     LT002
      CALL TRAN1(AX,AY,AZ,SIN3,COS3,SIN4,COS4,AU,AV,AW)                  LT002
      AV = AV + Z(16)                                                    LT002
      AW = AW - Z(15)                                                    LT002
      CALL TRAN2(0.,0.,Z(1),SIN5,COS5,SIN6,COS6,Z(53),Z(54),Z(55))       LT002
      CALL TRAN2(V1,V2,V3,SIN5,COS5,SIN6,COS6,Z(56),Z(57),Z(58))         LT002
      CALL TRAN2(AU,AV,AW,SIN5,COS5,SIN6,COS6,AX,AY,AZ)                  LT002
      AAA = V(6) - V(37)*T                                               LT002
      ARGA = AAA/V(45)                                                   LT002
      SINA = SIN(ARGA)                                                   LT002
      COSA = COS(ARGA)                                                   LT002
      CALL TRAN3(AX,AY,AZ,SINA,COSA,W(25),W(26),W(27),W(28),Z(59),Z(60), LT002
     1Z(61))                                                             LT002
      GO TO 60                                                           LT002
C  ****  TRANSFORMATIONS FOR INERTIAL COMPONENTS OF R, V, A(F), A(G)  ** LT002
   40 ARG = Z(42)/V(45)                                                  LT002
      SINGI = SIN(ARG)                                                   LT002
      COSGI = COS(ARG)                                                   LT002
      ARG = Z(65)/V(45)                                                  LT002
      SINBI = SIN(ARG)                                                   LT002
      COSBI = COS(ARG)                                                   LT002
      CALL TRAN1(0.,Z(41),0.,SINGI,COSGI,SINBI,COSBI,VX,VY,VZ)           LT002
      ARG = V(35)/Z(7)                                                   LT002
      AX = ARG*Z(44)                                                     LT002
      AY = ARG*Z(45)                                                     LT002
      AZ = ARG*Z(46)                                                     LT002
      CALL TRAN1(AX,AY,AZ,SIN3,COS3,SIN4,COS4,AU,AV,AW)                  LT002
      CALL TRAN2(0.,0.,Z(1),SIN5,COS5,SIN6,COS6,R1,R2,R3)                LT002
      CALL TRAN2(VX,VY,VZ,SIN5,COS5,SIN6,COS6,V1,V2,V3)                  LT002
      CALL TRAN2(AU,AV,AW,SIN5,COS5,SIN6,COS6,AX,AY,AZ)                  LT002
      CALL TRAN2(0.,Z(16),-Z(15),SIN5,COS5,SIN6,COS6,B1,B2,B3)           LT002
      AAA = V(6) - V(37)*T                                               LT002
      ARGA = AAA/V(45)                                                   LT002
      SINA = SIN(ARGA)                                                   LT002
      COSA = COS(ARGA)                                                   LT002
      CALL TRAN3(R1,R2,R3,SINA,COSA,W(25),W(26),W(27),W(28),Z(53),Z(54), LT002
     1Z(55))                                                             LT002
      CALL TRAN3(V1,V2,V3,SINA,COSA,W(25),W(26),W(27),W(28),Z(56),Z(57), LT002
     1Z(58))                                                             LT002
      CALL TRAN3(AX,AY,AZ,SINA,COSA,W(25),W(26),W(27),W(28),Z(59),Z(60), LT002
     1Z(61))                                                             LT002
      CALL TRAN3(B1,B2,B3,SINA,COSA,W(25),W(26),W(27),W(28),Z(62),Z(63), LT002
     1Z(64))                                                             LT002
C  ****  DOWN RANGE COMPUTATION  ****                                    LT002
   60 ARK1 = W(21)*W(23)                                                 LT002
      ARK2 = W(21)*W(22)                                                 LT002
      ARK5 = COS5*COS6                                                   LT002
      ARK6 = COS5*SIN6                                                   LT002
      COS49 = ARK1*ARK5 + ARK2*ARK6 + W(20)*SIN5                         LT002
      CALL QARG(COS49,Z(49),2,0)                                         LT002
      ARG = ARK1*ARK6 - ARK5*ARK2                                        LT002
      DUM = V(4) - 180.                                                  LT002
      IF(DUM*ARG.GT.0.) Z(49) = 360. - Z(49)                             LT002
      IF(V(68).LT..5.AND.Q(69,NSEC).LT..5) GO TO 85                      LT002
C  ****  AZIMUTH FROM INITIAL POINT  ****                                LT002
      LBX = ARK2*SIN5 - ARK6*W(20)                                       LT002
      LBY = ARK5*W(20) - ARK1*SIN5                                       LT002
      LBZ = ARK1*ARK6 - ARK5*ARK2                                        LT002
      LBW = LBX*W(22) - LBY*W(23)                                        LT002
      XLB = SQRT(LBX*LBX + LBY*LBY + LBZ*LBZ)                            LT002
      IF(XLB.LT.TEST1) GO TO 84                                          LT002
      Z(52) = V(45)*ACOS(LBW/XLB)                                        LT002
      Z52 = Z(52)                                                        LT002
      IF(LBZ.LT.0.) Z(52) = 360. - Z(52)                                 LT002
      GO TO 85                                                           LT002
   84 Z(52) = V(4)                                                       LT002
      Z52 = Z(52)                                                        LT002
C  ****  SLANT RANGE AND ELEVATION ANGLE FROM INITIAL POINT  ****        LT002
   85 IF(Q(69,NSEC).LT..5) GO TO 151                                     LT002
      XL1 = Z(1)*ARK5 - V(1)*ARK1                                        LT002
      XL2 = Z(1)*ARK6 - V(1)*ARK2                                        LT002
      XL3 = Z(1)*SIN5 - V(1)*W(20)                                       LT002
      Z(79) = SQRT(XL1*XL1 + XL2*XL2 + XL3*XL3)                          LT002
      IF(Z(79).LT.TEST1) GO TO 157                                       LT002
      ARG = ARK1*XL1 + ARK2*XL2 + W(20)*XL3                              LT002
      ARG = ARG/Z(79)                                                    LT002
      CALL QARG(ARG,ARG,2,0)                                             LT002
      Z(80) = 90. - ARG                                                  LT002
      GO TO 151                                                          LT002
  157 Z(80) = 0.                                                         LT002
  151 IF(V(68).LT..5) GO TO 999                                          LT002
C  ****  CROSS RANGE COMPUTATION  ****                                   LT002
      Z(50) = Z52 - W(24)                                                LT002
C  ****  TARGET MISS ANGLE COMPUTATION  ****                             LT002
      ARK3 = W(14)*W(16)                                                 LT002
      ARK4 = W(14)*W(15)                                                 LT002
      BDT = ARK5*ARK3 + ARK6*ARK4 + SIN5*W(13)                           LT002
      IF(ABS(BDT).GT..95) GO TO 86                                       LT002
      Z(51) = V(45)*ACOS(BDT)                                            LT002
      GO TO 150                                                          LT002
   86 BTX = ARK6*W(13) - ARK4*SIN5                                       LT002
      BTY = ARK3*SIN5 - ARK5*W(13)                                       LT002
      BTZ = ARK5*ARK4 - ARK3*ARK6                                        LT002
      SZ51 = SQRT(BTX*BTX + BTY*BTY + BTZ*BTZ)                           LT002
      CALL QARG(SZ51,Z(51),1,0)                                          LT002
      IF(BDT.LT.0.) Z(51) = 180. - Z(51)                                 LT002
  150 IF(Q(69,NSEC).LT.1.5) GO TO 999                                    LT002
C  ****  AZIMUTH, SLANT RANGE, AND ELEVATION ANGLE FROM TARGET POINT  ** LT002
      BTX = ARK4*SIN5 - W(13)*ARK6                                       LT002
      BTY = W(13)*ARK5 - ARK3*SIN5                                       LT002
      BTZ = ARK3*ARK6 - ARK4*ARK5                                        LT002
      BTW = BTX*W(15) - BTY*W(16)                                        LT002
      BDT = SQRT(BTX*BTX + BTY*BTY + BTZ*BTZ)                            LT002
      IF(BDT.LT.TEST1) GO TO 154                                         LT002
      Z(81) = V(45)*ACOS(BTW/BDT)                                        LT002
      GO TO 158                                                          LT002
  154 Z(81) = 0.                                                         LT002
  158 IF(BTZ.LT.0.) Z(81) = 360. - Z(81)                                 LT002
      XL1 = Z(1)*ARK5 - W(35)*ARK3                                       LT002
      XL2 = Z(1)*ARK6 - W(35)*ARK4                                       LT002
      XL3 = Z(1)*SIN5 - W(35)*W(13)                                      LT002
      Z(82) = SQRT(XL1*XL1 + XL2*XL2 + XL3*XL3)                          LT002
      IF(Z(82).LT.TEST1) GO TO 159                                       LT002
      ARG = ARK3*XL1 + ARK4*XL2 + W(13)*XL3                              LT002
      ARG = ARG/Z(82)                                                    LT002
      CALL QARG(ARG,ARG,2,0)                                             LT002
      Z(83) = 90. - ARG                                                  LT002
      GO TO 145                                                          LT002
  159 Z(83) = 0.                                                         LT002
  145 IF(Q(69,NSEC).LT.2.5) GO TO 999                                    LT002
C  ****  AZIMUTH AND ELEVATION ANGLE OF THE TARGET POINT FROM THE VEHICL LT002
      Z(95) = (Z(51)/V(45))*((W(35) - V(80))/V(46))                      LT002
      BTW = BTY*COS6 - BTX*SIN6                                          LT002
      IF(BDT.LT.TEST1) GO TO 138                                         LT002
      Z(93) = V(45)*ACOS(BTW/BDT)                                        LT002
      GO TO 139                                                          LT002
  138 Z(93) = 0.                                                         LT002
  139 IF(BTZ.GT.0.) Z(93) = 360. - Z(93)                                 LT002
      IF(Q(65,NSEC).LT..5) GO TO 147                                     LT002
      AQD = Z(3) - 360.                                                  LT002
      BQD = Z(3) + 360.                                                  LT002
      NQ = 1                                                             LT002
  137 IF(Z(93).LT.AQD) GO TO 142                                         LT002
      IF(Z(93).LT.BQD) GO TO 147                                         LT002
      Z(93) = Z(93) - 360.                                               LT002
      GO TO 136                                                          LT002
  142 Z(93) = Z(93) + 360.                                               LT002
  136 IF(NQ.GT.10) GO TO 998                                             LT002
      NQ = NQ +1                                                         LT002
      GO TO 137                                                          LT002
  998 WRITE(6,1005)                                                      LT002
  147 Z(94) = Z(93) - Z(4)                                               LT002
      IF(F(4).LT.0..AND.Z(94).GT. 60.)Z(94)=Z(94)-360.                   JDA12
      IF(F(4).GT.0..AND.Z(94).LT.-60.)Z(94)=Z(94)+360.                   JDA12
  999 RETURN                                                             LT002
      END                                                                LT002
  ELT TRAN1,1,710302, 33664
  EOF "                                                                        "
      SUBROUTINE TRAN1(ARG1,ARG2,ARG3,SIN3,COS3,SIN4,COS4,ARK1,ARK2,ARK3 TRAN1
     1)                                                                  TRAN1
      ARK1 = ARG1*COS4 + ARG2*SIN4*COS3 - ARG3*SIN4*SIN3                 TRAN1
      ARK2 = -ARG1*SIN4 + ARG2*COS4*COS3 - ARG3*COS4*SIN3                TRAN1
      ARK3 = ARG2*SIN3 + ARG3*COS3                                       TRAN1
      RETURN                                                             TRAN1
      END                                                                TRAN1
  ELT TRAN2,1,710302, 33665
  EOF "                                                                        "
      SUBROUTINE TRAN2(ARG1,ARG2,ARG3,SIN5,COS5,SIN6,COS6,ARK1,ARK2,ARK3 TRAN2
     1)                                                                  TRAN2
      ARK1 = -ARG1*SIN6 - ARG2*COS6*SIN5 + ARG3*COS6*COS5                TRAN2
      ARK2 = ARG1*COS6 - ARG2*SIN6*SIN5 + ARG3*SIN6*COS5                 TRAN2
      ARK3 = ARG2*COS5 + ARG3*SIN5                                       TRAN2
      RETURN                                                             TRAN2
      END                                                                TRAN2
  ELT TRAN3,1,710302, 33666
  EOF "                                                                        "
      SUBROUTINE TRAN3(ARG1,ARG2,ARG3,SINA,COSA,SINB,COSB,SINC,COSC,ARK1 TRAN3
     1,ARK2,ARK3)                                                        TRAN3
      ARK1 = ARG1*(COSA*COSB*COSC - SINA*SINC) + ARG2*(SINA*COSB*COSC +  TRAN3
     1 COSA*SINC) - ARG3*SINB*COSC                                       TRAN3
      ARK2 = -ARG1*(COSA*COSB*SINC + SINA*COSC) - ARG2*(SINA*COSB*SINC - TRAN3
     1 COSA*COSC) + ARG3*SINB*SINC                                       TRAN3
      ARK3 = ARG1*COSA*SINB + ARG2*SINA*SINB + ARG3*COSB                 TRAN3
      RETURN                                                             TRAN3
      END                                                                TRAN3
  ELT QUAD,1,710302, 33668
  EOF "                                                                        "
      SUBROUTINE QUAD(X,Y,I,M)                                           LT002
C  ****  X IS THE ENTRY ARGUMENT TO BE OPERATED ON  ****                 LT002
C  ****  Y IS THE EXIT ARGUMENT WHICH LIES WITHIN THE REQUIRED BOUNDS  * LT002
C  ****  I DEFINES THE PRINCIPAL CYCLE BOUNDS  ****                      LT002
C             I = 1.  DEFINES CYCLE BOUNDS OF 0 AND +360 DEGREES         LT002
C             I = 2.  DEFINES CYCLE BOUNDS OF -180 AND +180 DEGREES      LT002
C             I = 3.  DEFINES CYCLE BOUNDS OF 0 AND +2*PI RADIANS        LT002
C             I = 4.  DEFINES CYCLE BOUNDS OF -PI AND +PI RADIANS        LT002
C  ****  M DEFINES THE MAXIMUM NUMBER OF CYCLE TEST SETS  ****           LT002
 1001 FORMAT(71H0  ****  FAILURE TO PLACE ANGULAR ARGUMENT IN THE PRINCI LT002
     1PAL CYCLE  ****//5X,10H ENTRY ARG,10X,9H EXIT ARG,11X,10H LOW BOUN LT002
     2D,10X,11H HIGH BOUND,9X,13H CYCLE LENGTH,7X,2H N//5E20.8,4X,I3//)  LT002
      IF(M.LT.0) M = 10                                                  LT002
      GO TO (10,10,20,20), I                                             LT002
   10 C = 360.                                                           LT002
      GO TO (11,12), I                                                   LT002
   11 A = 0.                                                             LT002
      B = 360.                                                           LT002
      GO TO 50                                                           LT002
   12 A = -180.                                                          LT002
      B = 180.                                                           LT002
      GO TO 50                                                           LT002
   20 PI = 3.14159265                                                    LT002
      C = 2.*PI                                                          LT002
      J = I - 2                                                          LT002
      GO TO (21,22), I                                                   LT002
   21 A = 0.                                                             LT002
      B = C                                                              LT002
      GO TO 50                                                           LT002
   22 A = -PI                                                            LT002
      B = PI                                                             LT002
   50 N = 1                                                              LT002
      Y = X                                                              LT002
   51 IF(Y.LT.A) GO TO 52                                                LT002
      IF(Y.LT.B) GO TO 999                                               LT002
      Y = Y - C                                                          LT002
      GO TO 53                                                           LT002
   52 Y = Y + C                                                          LT002
   53 IF(N.GT.M) GO TO 998                                               LT002
      N = N + 1                                                          LT002
      GO TO 51                                                           LT002
  998 WRITE(6,1001) X, Y, A, B, C, N                                     LT002
  999 RETURN                                                             LT002
      END                                                                LT002
  ELT QARG,1,710302, 33670
  EOF "                                                                        "
      SUBROUTINE QARG(Y,Z,I,J)                                           QARG
C  ****  Y IS THE ENTRY ARGUMENT WHICH IS THE ARGUMENT OF THE FUNCTION   QARG
C  ****  Z IS THE EXIT ARGUMENT WHICH IS EVUALATED BY THE FUNCTION  **** QARG
C  ****  I DEFINES THE FUNCTION WHICH IS USED IN EVALUATING Z  ****      QARG
C             I = 1.  DENOTES THE ARCSINE FUNCTION                       QARG
C             I = 2.  DENOTES THE ARCCOSINE FUNCTION                     QARG
C             I = 3.  DENOTES THE ARCTANGENT FUNCTION                    QARG
C             I = 4.  DENOTES THE SQUARE ROOT FUNCTION                   QARG
C  ****  J IS THE ANGULAR CONVERSION FLAG                                QARG
C             J = 0., Z IS EXPRESSED IN DEGREES FOR I = 1, 2, OR 3       QARG
C             J = 0., Z IS SET TO ZERO WHEN Y IS NEGATIVE FOR I = 4      QARG
C             J = 1., Z IS EXPRESSED IN RADIANS FOR I = 1, 2, OR 3       QARG
C             J = 1., Z IS SET EQUAL TO THE SQUARE ROOT OF -Y WHEN Y IS  QARG
C             NEGATIVE FOR I = 4                                         QARG
      PI = 3.14159265                                                    QARG
      TEST2 = .9999999                                                   QARG
      IF(I.GE.4) GO TO 40                                                QARG
      IF(J.GT.0) GO TO 50                                                QARG
C  **** DETERMINATION OF ANGULAR CONVERSION FACTOR  ****                 QARG
      RR = 57.2957795                                                    QARG
      GO TO 51                                                           QARG
   50 RR = 1.                                                            QARG
   51 GO TO (10,20,30,40), I                                             QARG
C  ****  ARCSINE FUNCTION  ****                                          QARG
   10 IF(ABS(Y).LT.TEST2) GO TO 11                                       QARG
      ARG = .5*PI*RR                                                     QARG
      IF(Y.LT.0.) GO TO 12                                               QARG
      Z = ARG                                                            QARG
      GO TO 999                                                          QARG
   12 Z = -ARG                                                           QARG
      GO TO 999                                                          QARG
   11 Z = RR*ASIN(Y)                                                     QARG
      GO TO 999                                                          QARG
C  ****  ARCCOSINE FUNCTION  ****                                        QARG
   20 IF(ABS(Y).LT.TEST2) GO TO 21                                       QARG
      IF(Y.LT.0.) GO TO 22                                               QARG
      Z = 0.                                                             QARG
      GO TO 999                                                          QARG
   22 Z = PI*RR                                                          QARG
      GO TO 999                                                          QARG
   21 Z = RR*ACOS(Y)                                                     QARG
      GO TO 999                                                          QARG
C  ****  ARCTANGENT FUNCTION  ****                                       QARG
   30 Z = RR*ATAN(Y)                                                     QARG
      GO TO 999                                                          QARG
C  ****  SQUARE ROOT FUNCTION  ****                                      QARG
   40 IF(Y.LT.0.) GO TO 41                                               QARG
      Z = SQRT(Y)                                                        QARG
      GO TO 999                                                          QARG
   41 IF(J.LE.0)  GO TO 42                                               QARG
      Z = SQRT(-Y)                                                       QARG
      GO TO 999                                                          QARG
   42 Z = 0.                                                             QARG
  999 RETURN                                                             QARG
      END                                                                QARG
  ELT CNTVR,1,710302, 33672
  EOF "                                                                        "
      SUBROUTINE CNTVR(ITYPE,LCV)                                        CNTVR
      DIMENSION SAVE(3)                                                  CNTVR
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      ISEC = IFIX(V(LCV+13))                                             CNTVR
      IPAR = IFIX(V(LCV+10))                                             CNTVR
      MSEC = 0                                                           CNTVR
      LSEC = 0                                                           CNTVR
      KSEC = 0                                                           CNTVR
      JSEC = 0                                                           CNTVR
      IF(ISEC.LT.100) GO TO 51                                           CNTVR
      MSEC = ISEC/100000000                                              CNTVR
      IARG = ISEC - MSEC*100000000                                       CNTVR
      LSEC = IARG/1000000                                                CNTVR
      IARG = IARG - LSEC*1000000                                         CNTVR
      KSEC = IARG/10000                                                  CNTVR
      IARG = IARG - KSEC*10000                                           CNTVR
      JSEC = IARG/100                                                    CNTVR
      ISEC = IARG - JSEC*100                                             CNTVR
   51 GO TO (11,12,13,11), ITYPE                                         CNTVR
   11 IF(ISEC.GT.0) GO TO 20                                             CNTVR
      CV(LCV) = V(IPAR)                                                  CNTVR
      GO TO 21                                                           CNTVR
   20 CV(LCV) = Q(IPAR,ISEC)                                             CNTVR
      IF(MSEC.GT.0.AND.ITYPE.LT.2) DM = Q(IPAR,MSEC) - Q(IPAR,ISEC)      CNTVR
      IF(LSEC.GT.0.AND.ITYPE.LT.2) DL = Q(IPAR,LSEC) - Q(IPAR,ISEC)      CNTVR
      IF(KSEC.GT.0.AND.ITYPE.LT.2) DK = Q(IPAR,KSEC) - Q(IPAR,ISEC)      CNTVR
      IF(JSEC.GT.0.AND.ITYPE.LT.2) DJ = Q(IPAR,JSEC) - Q(IPAR,ISEC)      CNTVR
   21 IF(ITYPE.GT.3) GO TO 999                                           CNTVR
      SAVE(LCV) = CV(LCV)                                                CNTVR
      GO TO 999                                                          CNTVR
   12 IF(ISEC.GT.0) GO TO 30                                             CNTVR
      V(IPAR) = CV(LCV)                                                  CNTVR
      GO TO 999                                                          CNTVR
   30 Q(IPAR,ISEC) = CV(LCV)                                             CNTVR
      GO TO 50                                                           CNTVR
   13 IF(ISEC.GT.0) GO TO 40                                             CNTVR
      V(IPAR) = SAVE(LCV)                                                CNTVR
      GO TO 999                                                          CNTVR
   40 Q(IPAR,ISEC) = SAVE(LCV)                                           CNTVR
   50 IF(MSEC.GT.0) Q(IPAR,MSEC) = Q(IPAR,ISEC) + DM                     CNTVR
      IF(LSEC.GT.0) Q(IPAR,LSEC) = Q(IPAR,ISEC) + DL                     CNTVR
      IF(KSEC.GT.0) Q(IPAR,KSEC) = Q(IPAR,ISEC) + DK                     CNTVR
      IF(JSEC.GT.0) Q(IPAR,JSEC) = Q(IPAR,ISEC) + DJ                     CNTVR
  999 RETURN                                                             CNTVR
      END                                                                CNTVR
  ELT ATMOS,1,710302, 33674
  EOF "                                                                        "
      SUBROUTINE ATMOS                                                   ATMOS
      COMMON/APV/ALT(200),PRS(200),VLS(200)                              ATMOS
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
 1001 FORMAT(83H0 ****   FAILURE IN THE TABLE LOOK-UP OF SUBROUTINE ATMO ATMOS
     1S DURING SIMULATION SECTION,I3,7H   ****///)                       ATMOS
      IF(W(1).GT..5) GO TO 10                                            ATMOS
      W(1) = 1.1                                                         ATMOS
      ITRIP = 2                                                          ATMOS
      JMAX = IFIX(XNA0)                                                  ATMOS
   10 IF(Z(8).GT.ALT(ITRIP)) GO TO 11                                    ATMOS
      JSTOP = ITRIP - 1                                                  ATMOS
      DO 14 J=1,JSTOP                                                    ATMOS
      I = ITRIP - J + 1                                                  ATMOS
      IF(Z(8).GE.ALT(I-1)) GO TO 13                                      ATMOS
   14 CONTINUE                                                           ATMOS
      GO TO 998                                                          ATMOS
   11 JSTOP = JMAX - ITRIP                                               ATMOS
      IF(JSTOP.LE.0) GO TO 998                                           ATMOS
      DO 12 J=1,JSTOP                                                    ATMOS
      I = ITRIP + J                                                      ATMOS
      IF(Z(8).LE.ALT(I)) GO TO 13                                        ATMOS
   12 CONTINUE                                                           ATMOS
  998 W(1) = .1                                                          ATMOS
      Z(36) = 0.                                                         ATMOS
      Z(37) = 0.                                                         ATMOS
      WRITE(6,1001) NSEC                                                 ATMOS
      CALL PAROUT                                                        ATMOS
      W(32) = 1.1                                                        ATMOS
      GO TO 999                                                          ATMOS
   13 ITRIP = I                                                          ATMOS
      ARG = (Z(8) - ALT(I-1))/(ALT(I) - ALT(I-1))                        ATMOS
      Z(36) = PRS(I-1) + ARG*(PRS(I) - PRS(I-1))                         ATMOS
      Z(37) = VLS(I-1) + ARG*(VLS(I) - VLS(I-1))                         ATMOS
  999 RETURN                                                             ATMOS
      END                                                                ATMOS
  ELT XNEW1,1,710302, 33676
  EOF "                                                                        "
      SUBROUTINE XNEW1(JFLAG,ICV,KA,KB,KI)                               XNEW1
C        GENERAL (1X1) NEWTON-RAPHSON ITERATION SCHEME                   XNEW1
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
 1001 FORMAT(51H1   *****   SUCCESSFUL CONVERGENCE IN XNEW1   *****)     XNEW1
 1002 FORMAT(66H1   *****   EXCEEDED MAXIMUM NUMBER OF ITERATIONS IN XNE XNEW1
     1W1   *****)                                                        XNEW1
 1003 FORMAT(60H1   *****   CONTROL VARIABLE EXCEEDED LIMIT IN XNEW1   * XNEW1
     1****////11X,18H CONTROL VARIABLE ,I1,3H  =,E17.8,4X,10H LIMITS  =, XNEW1
     2E17.8,4H  TO,E17.8)                                                XNEW1
 1004 FORMAT(70H1   *****   END CONDITIONS ARE INVARIANT TO CONTROL PARA XNEW1
     1METERS   *****)                                                    XNEW1
      MCYC = IFIX(V(ICV+56))                                             XNEW1
      ICYC = 1                                                           XNEW1
      ARG=SV(24)                                                         XNEW1
      JFLAG = 0                                                          XNEW1
      W(10) =  .1                                                        XNEW1
      W(11) = W(11) + 1.                                                 XNEW1
      CALL CNTVR(1,ICV)                                                  XNEW1
      CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW1
      X1 = CV(ICV)                                                       XNEW1
      Y1 = EC(ICV)                                                       XNEW1
      ARG1 = Y1 - V(ICV+51)                                              XNEW1
      IF(W(30).GT..5) GO TO 999                                          XNEW1
      IF(KFLAG.GT.0) GO TO 11                                            XNEW1
      IF(ABS(ARG1).LE.V(ICV+31)) GO TO 12                                XNEW1
      X2=X1-ARG1/SV(24)                                                  XNEW1
      CV(ICV) = X2                                                       XNEW1
      CALL CNTVR(2,ICV)                                                  XNEW1
      CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW1
      Y2 = EC(ICV)                                                       XNEW1
      ARG2 = Y2 - V(ICV+51)                                              XNEW1
      IF(W(30).GT..5) GO TO 999                                          XNEW1
      IF(KFLAG.GT.0) GO TO 11                                            XNEW1
      ARG=(Y2-Y1)/(X2-X1)                                                XNEW1
      IF(ABS(ARG2).LE.V(ICV+31)) GO TO 12                                XNEW1
C        PREDICT NEW VALUE FOR THE CONTROL VARIABLE                      XNEW1
   14 CONTINUE                                                           XNEW1
      ARG=(Y2-Y1)/(X2-X1)                                                XNEW1
      IF(ABS(ARG).LT..0000001) GO TO 997                                 XNEW1
      X3=X1+(V(ICV+51)-Y1)/ARG                                           XNEW1
      IF(X3.GT.V(ICV+25).OR.X3.LT.V(ICV+28)) GO TO 15                    XNEW1
      CV(ICV) = X3                                                       XNEW1
      CALL CNTVR(2,ICV)                                                  XNEW1
      CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW1
      Y3 = EC(ICV)                                                       XNEW1
      ARG3=Y3-V(ICV+51)                                                  XNEW1
      IF(W(30).GT..5) GO TO 999                                          XNEW1
      IF(KFLAG.GT.0) GO TO 11                                            XNEW1
      ARG=(Y3-Y1)/(X3-X1)                                                XNEW1
      IF(ABS(ARG3).LE.V(ICV+31)) GO TO 12                                XNEW1
      IF(ICYC.GE.MCYC) GO TO 13                                          XNEW1
      ICYC = ICYC + 1                                                    XNEW1
      IF(ABS(ARG1).LT.ABS(ARG2)) GO TO 16                                XNEW1
      X1 = X2                                                            XNEW1
      Y1 = Y2                                                            XNEW1
      ARG1=ARG2                                                          XNEW1
   16 X2 = X3                                                            XNEW1
      Y2 = Y3                                                            XNEW1
      ARG2=ARG3                                                          XNEW1
      GO TO 14                                                           XNEW1
   11 JFLAG = 1                                                          XNEW1
      GO TO 999                                                          XNEW1
C        SUCCESSFUL CONVERGENCE                                          XNEW1
   12 IF( SW(2).EQ.1.  .OR.  SW(16).NE.0. )                              XNEW1
     1WRITE(6,1001)                                                      XNEW1
      SV(24)=ARG                                                         XNEW1
      GO TO 999                                                          XNEW1
C        EXCEEDED MAXIMUM NUMBER OF ITERATIONS                           XNEW1
   13 WRITE(6,1002)                                                      XNEW1
      GO TO 998                                                          XNEW1
C        CONTROL VARIABLE EXCEEDED LIMIT                                 XNEW1
   15 WRITE(6,1003) ICV, X3, V(ICV+28), V(ICV+25)                        XNEW1
      GO TO 998                                                          XNEW1
C        END CONDITIONS ARE INVARIANT TO CONTROL PARAMETERS              XNEW1
  997 WRITE(6,1004)                                                      XNEW1
  998 W(30) = 1.1                                                        XNEW1
  999 RETURN                                                             XNEW1
      END                                                                XNEW1
  ELT AERO1,1,710302, 33677
  EOF "                                                                        "
      SUBROUTINE AERO1                                                   AERO1
C     DUMMY SUBROUTINE FOR YAW AERODYNAMICS                              AERO1
      RETURN                                                             AERO1
      END                                                                AERO1
  ELT AERO2,1,710302, 33679
  EOF "                                                                        "
      SUBROUTINE AERO2(M)                                                AERO2
      DIMENSION D(12)                                                    AERO2
      DIMENSION ITRP(5),KTRP(5),ISND(5),JMX(5),LMX(5),XW3(5),XW4(5)      LT002
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/AEROX/XW3,XW4                                               AERO2
 1001 FORMAT(83H0 ****   FAILURE IN THE TABLE LOOK-UP OF SUBROUTINE AERO AERO2
     12 DURING SIMULATION SECTION,I3,7H   ****///)                       AERO2
      IF(XW3(M).GT..5) GO TO 10                                          AERO2
      XW3(M) = 1.1                                                       AERO2
      ITRP(M) = 2                                                        AERO2
      KTRP(M) = 2                                                        AERO2
      ISND(M) = M                                                        AERO2
      JMX(M) = XNA2(1,M)                                                 AERO2
      LMX(M) = XNA2(2,M)                                                 AERO2
   10 ITRIP = ITRP(M)                                                    AERO2
      KTRIP = KTRP(M)                                                    AERO2
      ISEND = ISND(M)                                                    AERO2
      JMAX = JMX(M)                                                      AERO2
      LMAX = LMX(M)                                                      AERO2
      IF(Z(40).GT.XM2(ITRIP,ISEND)) GO TO 11                             AERO2
      JSTOP = ITRIP - 1                                                  AERO2
      DO 14 J=1,JSTOP                                                    AERO2
      I = ITRIP - J + 1                                                  AERO2
      IF(Z(40).GE.XM2(I-1,ISEND)) GO TO 13                               AERO2
   14 CONTINUE                                                           AERO2
      GO TO 998                                                          AERO2
   11 JSTOP = JMAX - ITRIP                                               AERO2
      IF(JSTOP.LE.0) GO TO 998                                           AERO2
      DO 12 J=1,JSTOP                                                    AERO2
      I = ITRIP + J                                                      AERO2
      IF(Z(40).LE.XM2(I,ISEND)) GO TO 13                                 AERO2
   12 CONTINUE                                                           AERO2
      GO TO 998                                                          AERO2
   13 ITRIP = I                                                          AERO2
      IF(Z(12).GT.A2(KTRIP,ISEND)) GO TO 15                              AERO2
      LSTOP = KTRIP - 1                                                  AERO2
      DO 18 L=1,LSTOP                                                    AERO2
      K = KTRIP - L + 1                                                  AERO2
      IF(Z(12).GE.A2(K-1,ISEND)) GO TO 17                                AERO2
   18 CONTINUE                                                           AERO2
      GO TO 998                                                          AERO2
   15 LSTOP = LMAX - KTRIP                                               AERO2
      IF(LSTOP.LE.0) GO TO 998                                           AERO2
      DO 16 L=1,LSTOP                                                    AERO2
      K = KTRIP + L                                                      AERO2
      IF(Z(12).LE.A2(K,ISEND)) GO TO 17                                  AERO2
   16 CONTINUE                                                           AERO2
  998 W(3) = .1                                                          AERO2
      Z(22) = 0.                                                         AERO2
      WRITE(6,1001) NSEC                                                 AERO2
      CALL PAROUT                                                        AERO2
      W(32) = 1.1                                                        AERO2
      GO TO 999                                                          AERO2
   17 KTRIP = K                                                          AERO2
      ARG1 = (Z(40) - XM2(I-1,ISEND))/(XM2(I,ISEND) - XM2(I-1,ISEND))    AERO2
      D(K) = C2(I-1,K,ISEND) + ARG1*(C2(I,K,ISEND) - C2(I-1,K,ISEND))    AERO2
      D(K-1) = C2(I-1,K-1,ISEND) + ARG1*(C2(I,K-1,ISEND) - C2(I-1,K-1,IS AERO2
     1END))                                                              AERO2
      ARG2 = (Z(12) - A2(K-1,ISEND))/(A2(K,ISEND) - A2(K-1,ISEND))       AERO2
      Z(22) = D(K-1) + ARG2*(D(K) - D(K-1))                              AERO2
  999 ITRP(M) = ITRIP                                                    AERO2
      KTRP(M) = KTRIP                                                    AERO2
      RETURN                                                             AERO2
      END                                                                AERO2
  ELT PRPSN,1,710302, 33682
  EOF "                                                                        "
      SUBROUTINE PRPSN                                                   PRPSN
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
 1001 FORMAT(83H0 ****   FAILURE IN THE TABLE LOOK-UP OF SUBROUTINE PRPS PRPSN
     1N DURING SIMULATION SECTION,I3,7H   ****///)                       PRPSN
 1002 FORMAT(64H0 ****   WEIGHT OF THE VEHICLE IS ZERO DURING SIMULATION PRPSN
     1 SECTION,I3,7H   ****///)                                          PRPSN
 1003 FORMAT(62H0 ****   INPUT SPECIFIC IMPULSE IS ZERO FOR SIMULATION S PRPSN
     1ECTION,I3,7H   ****///)                                            PRPSN
      IF(W(5).GT..5) GO TO 17                                            PRPSN
C  ****  ISEND INITIALLY DEFINES THE TOTAL COMBINED PROPULSION OPTIONS   PRPSN
      ISEND = IFIX(Q(31,NSEC))                                           PRPSN
      W(5) = 1.1                                                         PRPSN
   17 IF(ISEND.GT.10) GO TO 24                                           PRPSN
C  ****  ISEND DEFINES THE SIMPO OPTION WHEN THERE ARE NO TABLES  ****   PRPSN
      GO TO (18,19,13,40,41,43,42,53,52,18), ISEND                       PRPSN
C  ****  CONSTANT WDOT, VARIABLE THRUST AND SPECIFIC IMPULSE  ****       PRPSN
   18 IF(ABS(Q(2,NSEC)).LT..000001) GO TO 11                             PRPSN
      Z(27) = Q(1,NSEC) - (Q(1,NSEC) - Q(2,NSEC))*Z(36)/V(43)            PRPSN
      GO TO 12                                                           PRPSN
   11 Z(27) = Q(1,NSEC)                                                  PRPSN
   12 Z(47) = Q(3,NSEC)                                                  PRPSN
   45 IF(ABS(Z(47)).LT..000001) GO TO 10                                 PRPSN
      Z(48) = Z(27)/Z(47)                                                PRPSN
      GO TO 995                                                          PRPSN
   10 Z(48) = 0.                                                         PRPSN
      GO TO 995                                                          PRPSN
C  ****  CONSTANT WDOT, VARIABLE THRUST AND SPECIFIC IMPULSE  ****       PRPSN
   19 IF(ABS(Q(3,NSEC)).LT..000001) GO TO 20                             PRPSN
      Z(47) = Q(1,NSEC)/Q(2,NSEC)                                        PRPSN
      Z(48) = Q(2,NSEC) - (Q(2,NSEC) - Q(3,NSEC))*Z(36)/V(43)            PRPSN
      GO TO 21                                                           PRPSN
   20 Z(48) = Q(2,NSEC)                                                  PRPSN
      Z(47) = Q(1,NSEC)/Q(2,NSEC)                                        PRPSN
   21 IF(ABS(Q(2,NSEC)).LT..000001) GO TO 22                             PRPSN
      GO TO 23                                                           PRPSN
   22 Z(47) = 0.                                                         PRPSN
   23 Z(27) = Z(47)*Z(48)                                                PRPSN
      GO TO 995                                                          PRPSN
C  ****  CONSTANT THRUST, VARIABLE WDOT AND SPECIFIC IMPULSE  ****       PRPSN
   13 IF(ABS(Q(3,NSEC)).LT..000001) GO TO 14                             PRPSN
      Z(48) = Q(2,NSEC) - (Q(2,NSEC) - Q(3,NSEC))*Z(36)/V(43)            PRPSN
      GO TO 15                                                           PRPSN
   14 Z(48) = Q(2,NSEC)                                                  PRPSN
   15 Z(27) = Q(1,NSEC)                                                  PRPSN
   46 IF(ABS(Z(48)).LT..000001) GO TO 16                                 PRPSN
      Z(47) = Z(27)/Z(48)                                                PRPSN
C                                                                        PRPSN
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    PRPSN
C                                                                        PRPSN
      IF(NSEC.GT.1) GO TO 101                                            PRPSN
      IF(SQ(20,1).LE.0.) GO TO 101                                       PRPSN
      SQ(30,2) = Z(27)-SQ(30,1)                                          PRPSN
      SQ(30,3) = Z(47) - SQ(30,4)                                        PRPSN
      IF(SQ(30,3).GE.0.) GO TO 101                                       PRPSN
      SQ(30,3) = 0.                                                      PRPSN
      SQ(30,2) = 0.                                                      PRPSN
      Z(27) = SQ(30,1)                                                   PRPSN
      Z(47) = SQ(30,4)                                                   PRPSN
      Z(48) = Z(27)/Z(47)                                                PRPSN
  101 CONTINUE                                                           PRPSN
C                                                                        PRPSN
C                                                                        PRPSN
      GO TO 995                                                          PRPSN
   16 Z(47) = 0.                                                         PRPSN
      GO TO 995                                                          PRPSN
C  ****  VACUUM THRUST, CONSTANT WDOT, AND EXIT AREA  ****               PRPSN
   40 Z(27) = Q(1,NSEC) - Z(36)*Q(3,NSEC)                                PRPSN
      GO TO 44                                                           PRPSN
C  ****  SEA LEVEL THRUST, CONSTANT WDOT, AND EXIT AREA  ****            PRPSN
   41 Z(27) = Q(1,NSEC) + (V(43) - Z(36))*Q(3,NSEC)                      PRPSN
   44 Z(47) = Q(2,NSEC)                                                  PRPSN
      GO TO 45                                                           PRPSN
C  ****  VAC THRUST - MAX (T-FA)/W, VACUUM AND SEA LEVEL SPECIFIC IMPULS PRPSN
   43 LSEND = 2                                                          PRPSN
      GO TO 47                                                           PRPSN
C  ****  VAC THRUST - MAX T/W, VACUUM AND SEA LEVEL SPECIFIC IMPULSE  ** PRPSN
   53 LSEND = 4                                                          PRPSN
   47 IF(ABS(Q(2,NSEC)).LT..000001) GO TO 992                            PRPSN
      IF(ABS(Q(3,NSEC)).LT..000001) Q(3,NSEC) = Q(2,NSEC)                PRPSN
      WDREF = Q(1,NSEC)/Q(2,NSEC)                                        PRPSN
      GO TO 49                                                           PRPSN
C  ****  S.L. THRUST - MAX (T-FA)/W, VACUUM AND SEA LEVEL SPECIFIC IMPUL PRPSN
   42 LSEND = 1                                                          PRPSN
      GO TO 48                                                           PRPSN
C  ****  S.L. THRUST - MAX T/W, VACUUM AND SEA LEVEL SPECIFIC IMPULSE  * PRPSN
   52 LSEND = 3                                                          PRPSN
   48 IF(ABS(Q(3,NSEC)).LT..000001) GO TO 992                            PRPSN
      IF(ABS(Q(2,NSEC)).LT..000001) Q(2,NSEC) = Q(3,NSEC)                PRPSN
      WDREF = Q(1,NSEC)/Q(3,NSEC)                                        PRPSN
   49 IF(ABS(Z(7)).LT..000001) GO TO 994                                 PRPSN
      Z(48) = Q(2,NSEC) - (Q(2,NSEC) - Q(3,NSEC))*Z(36)/V(43)            PRPSN
      ARG = WDREF*Z(48)                                                  PRPSN
C                                                                        PRPSN
C     FIXED SOLID STRAPON SYNTHESIS OPTION   ************************    PRPSN
C                                                                        PRPSN
      IF(NSEC.GT.1) GO TO 100                                            PRPSN
      IF(SQ(20,1).LE.0.) GO TO 100                                       PRPSN
      TVS = SQ(20,1)*(SQ(20,2) + SQ(20,3)*T)                             PRPSN
      SQ(30,4) = TVS/SQ(20,4)                                            PRPSN
      SQ(30,1) = TVS - SQ(20,1)*Z(36)*SQ(21,1)                           PRPSN
      SQ(30,2) = ARG                                                     PRPSN
      SQ(30,5) = ARG                                                     PRPSN
      ARG = ARG + SQ(30,1)                                               PRPSN
      SQ(30,3) = WDREF                                                   PRPSN
      SQ(31,1) = WDREF                                                   PRPSN
      WDREF = WDREF + SQ(30,4)                                           PRPSN
      Z(48) = ARG/WDREF                                                  PRPSN
  100 CONTINUE                                                           PRPSN
C                                                                        PRPSN
C                                                                        PRPSN
      GO TO (50,50,51,51), LSEND                                         PRPSN
   50 IF((ARG+Z(25))/Z(7).LE.Q(66,NSEC)) GO TO 54                        PRPSN
      Z(27) = Z(7)*Q(66,NSEC) - Z(25)                                    PRPSN
      GO TO 46                                                           PRPSN
   51 IF(ARG/Z(7).LE.Q(66,NSEC)) GO TO 54                                PRPSN
      Z(27) = Z(27)*Q(66,NSEC)                                           PRPSN
      GO TO 46                                                           PRPSN
   54 Z(27) = ARG                                                        PRPSN
      Z(47) = WDREF                                                      PRPSN
      GO TO 995                                                          PRPSN
  992 W(5) = .1                                                          PRPSN
      WRITE(6,1003) NSEC                                                 PRPSN
      GO TO 993                                                          PRPSN
  994 W(5) = .1                                                          PRPSN
      WRITE(6,1002) NSEC                                                 PRPSN
      GO TO 993                                                          PRPSN
C  ****  THRUST TABLE  ****                                              PRPSN
   24 IF(W(5).GT.1.5) GO TO 29                                           PRPSN
      W(5) = 2.1                                                         PRPSN
      IARG = 10                                                          PRPSN
C  ****  KSEND DEFINES WHICH TABLE IS TO BE USED  ****                   PRPSN
      KSEND = MOD(ISEND,IARG)                                            PRPSN
C  ****  JSEND DEFINES THE SIMPO OPTION TO BE USED WITH THE TABLE  ****  PRPSN
      JSEND = (ISEND - KSEND)/10                                         PRPSN
      JMAX = IFIX(XNP(KSEND))                                            PRPSN
      CANT = COS(Q(50,NSEC)/V(45))                                       PRPSN
      KSEC = IFIX(Q(47,NSEC))                                            PRPSN
      ITRIP = 2                                                          PRPSN
      IF(KSEC.LT.1) KSEC = 1                                             PRPSN
   29 ARGT = T - TS(KSEC) - Q(48,NSEC)                                   PRPSN
      IF(ARGT.LT.TWD7(1,KSEND)) GO TO 997                                PRPSN
      IF(ARGT.GT.TWD7(ITRIP,KSEND)) GO TO 25                             PRPSN
      JSTOP = ITRIP - 1                                                  PRPSN
      DO 27 J=1,JSTOP                                                    PRPSN
      I = ITRIP - J + 1                                                  PRPSN
      IF(ARGT.GE.TWD7(I-1,KSEND)) GO TO 28                               PRPSN
   27 CONTINUE                                                           PRPSN
      GO TO 998                                                          PRPSN
   25 JSTOP = JMAX - ITRIP                                               PRPSN
      IF(JSTOP.LE.0) GO TO 998                                           PRPSN
      DO 26 J=1,JSTOP                                                    PRPSN
      I = ITRIP + J                                                      PRPSN
      IF(ARGT.LE.TWD7(I,KSEND)) GO TO 28                                 PRPSN
   26 CONTINUE                                                           PRPSN
  998 W(5) = .1                                                          PRPSN
      WRITE(6,1001) NSEC                                                 PRPSN
      CALL PAROUT                                                        PRPSN
      W(32) = 1.1                                                        PRPSN
      GO TO 997                                                          PRPSN
  993 CALL PAROUT                                                        PRPSN
      W(32) = 1.1                                                        PRPSN
      Z(27) = 0.                                                         PRPSN
      Z(47) = 0.                                                         PRPSN
      Z(48) = 0.                                                         PRPSN
      GO TO 999                                                          PRPSN
   28 ITRIP = I                                                          PRPSN
      ARG = (ARGT - TWD7(I-1,KSEND))/(TWD7(I,KSEND) - TWD7(I-1,KSEND))   PRPSN
      Z(27) = TWD8(I-1,KSEND) + ARG*(TWD8(I,KSEND) - TWD8(I-1,KSEND))    PRPSN
      IF(ABS(Q(51,NSEC)).GT..000001) GO TO 30                            PRPSN
C  ****  WDOT TABLE  ****                                                PRPSN
      Z(47) = TWD9(I-1,KSEND) + ARG*(TWD9(I,KSEND) - TWD9(I-1,KSEND))    PRPSN
      GO TO 31                                                           PRPSN
C  ****  WDOT VIA EFFECTIVE SPECIFIC IMPULSE  ****                       PRPSN
   30 Z(47) = Z(27)/Q(51,NSEC)                                           PRPSN
   31 Z(27) = Q(49,NSEC)*CANT*(Z(27) - Z(36)*Q(61,NSEC))                 PRPSN
      Z(47) = Q(49,NSEC)*Z(47)                                           PRPSN
      Z(48) = Z(27)/Z(47)                                                PRPSN
      GO TO 996                                                          PRPSN
  995 IF(ISEND.LT.11) GO TO 999                                          PRPSN
      Z(27) = Z(27) + Z27                                                PRPSN
      Z(47) = Z(47) + Z47                                                PRPSN
      Z(48) = Z(27)/Z(47)                                                PRPSN
      GO TO 999                                                          PRPSN
  997 Z(27) = 0.                                                         PRPSN
      Z(47) = 0.                                                         PRPSN
      Z(48) = 0.                                                         PRPSN
  996 IF(JSEND.GT.9) GO TO 991                                           PRPSN
      Z27 = Z(27)                                                        PRPSN
      Z47 = Z(47)                                                        PRPSN
      GO TO (18,19,13,40,41,43,42,53,52,18), JSEND                       PRPSN
  991 Z(47) = Z(47) + Q(3,NSEC)                                          PRPSN
  999 RETURN                                                             PRPSN
      END                                                                PRPSN
  ELT INTGRT,1,710302, 33687
  EOF "                                                                        "
      SUBROUTINE INTGRT(X,Y,N)                                           MSCC
      DOUBLE PRECISION        Y1(12),Y2(12),Y3(12),Y4(12),Y5(12),        MSCC
     *FD(12),H0,H2,H3,H6,H8,Y0(12),X0,ARGD                               MSCC
      DIMENSION TMAX(12),TMIN(12),F0(12),F1(12),F2(12),F3(12),F4(12),F5( MSCC
     112),Y(12),ERROR(12),YS1(12),YS2(12),YS3(12),YS4(12),YS5(12)        MSCC
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   MSCC
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  MSCC
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        MSCC
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  MSCC
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     MSCC
     5 PS(15)                                                            MSCC
 1001 FORMAT(71H0 ****   STEPSIZE IS LESS THAN THE INPUT STEPSIZE IN SIM MSCC
     1ULATION SECTION,I3,7H   ****//6X,10H STEP SIZE,6X,9H MIN STEP,7X,9 MSCC
     2H ERROR(1),7X,9H ERROR(2),7X,9H ERROR(3),7X,9H ERROR(4),7X,9H ERRO MSCC
     3R(5)/6X,9H ERROR(6),7X,9H ERROR(7),7X,9H ERROR(8),7X,9H ERROR(9),7 MSCC
     4X,10H ERROR(10),6X,10H ERROR(11),6X,10H ERROR(12)//5X,7E16.8/5X,7E MSCC
     516.8///)                                                           MSCC
 1002 FORMAT(27H0 ****   TERMINATED SECTION,I3,22H ON BACKUP TIME   **** MSCC
     1//7X,5H TIME,2X,10H ABS BTIME,2X,10H REL BTIME,2X,10H BTIME TOL,2X MSCC
     2,10H TERM CODE,4X,11H TERM VALUE,7X,9H TERM TOL,8X,4H DIR//3F12.3, MSCC
     3F12.6,I12,2E18.8,F7.1///)                                          MSCC
 1003 FORMAT(38H0 ****   FAILED IN BACKUP TIME SECTION,I3,19H TERMINATIO MSCC
     1N   ****//7X,5H TIME,2X,10H ABS BTIME,2X,10H REL BTIME,2X,10H BTIM MSCC
     2E TOL,2X,10H TERM CODE,4X,11H TERM VALUE,7X,9H TERM TOL,8X,4H DIR/ MSCC
     3/3F12.3,F12.6,I12,3E18.8,F7.1///)                                  MSCC
 1004 FORMAT(33H0 ****   FAILED IN NORMAL SECTION,I3,19H TERMINATION   * MSCC
     1***//7X,5H TIME,2X,10H ABS BTIME,2X,10H REL BTIME,2X,10H BTIME TOL MSCC
     2,2X,10H TERM CODE,4X,11H TERM VALUE,7X,9H TERM TOL,8X,4H DIR//3F12 MSCC
     3.3,F12.6,I12,2E18.8,F7.1///)                                       MSCC
C                                                                        MSCC
      NSECX = SQ(2,1) + .1                                               MSCC
      H = Q(7,NSEC)                                                      MSCC
      ISTG = IFIX(Q(22,NSEC))                                            MSCC
      STGT = Q(24,NSEC)                                                  MSCC
      STGV = Q(23,NSEC)                                                  MSCC
      COET = Q(25,NSEC)                                                  MSCC
      DO 54 I=1,7                                                        MSCC
      TMAX(I) = Q(I+7,NSEC)                                              MSCC
   54 TMIN(I) = Q(I+14,NSEC)                                             MSCC
      DO 61 I=8,11                                                       MSCC
      TMAX(I) = Q(9,NSEC)                                                MSCC
   61 TMIN(I) = Q(16,NSEC)                                               MSCC
      TMAX(12) = Q(54,NSEC)                                              MSCC
      TMIN(12) = Q(55,NSEC)                                              MSCC
      HMIN = Q(39,NSEC)                                                  MSCC
      SCOEF = Q(40,NSEC)                                                 MSCC
      TBCKT = Q(41,NSEC)                                                 MSCC
      BCKPT = Q(42,NSEC)                                                 MSCC
      IPRNT = 1                                                          MSCC
      JPRNT = IFIX(Q(53,NSEC))                                           MSCC
      CALL EQTNL(X,Y,F0,H,2)                                             MSCC
      X0=DBLE(X)                                                         MSCC
      DO 10 I=1,N                                                        MSCC
      Y0(I)=DBLE(Y(I))                                                   MSCC
   10 FD(I)=DBLE(F0(I))                                                  MSCC
      H0=DBLE(H)                                                         MSCC
      H2 = H0/2.                                                         MSCC
      H3 = H0/3.                                                         MSCC
      H6 = H0/6.                                                         MSCC
      H8 = H0/8.                                                         MSCC
      JSTG = 0                                                           MSCC
      KSTG = 0                                                           MSCC
      ICYC = 10                                                          MSCC
      KCYC = 10                                                          MSCC
      LOUT = 1                                                           MSCC
      IF(TBCKT) 49,49,48                                                 MSCC
   48 TBCKP = TBCKT + TS(NSEC)                                           MSCC
      GO TO 50                                                           MSCC
   49 TBCKP = -TBCKT                                                     MSCC
   50 COEF = SIGN(1.,COET)                                               MSCC
      IF(ISTG) 11,12,13                                                  MSCC
   11 STGTV = STGV                                                       MSCC
      GO TO 14                                                           MSCC
   12 STGTV = STGV + TS(NSEC)                                            MSCC
      GO TO 14                                                           MSCC
C  ****  INITIALIZATION OF THE NON STATE STAGING PARAMETERS  ****        MSCC
   13 IF(ISTG-7) 14,58,59                                                MSCC
   58 STGV = STGV + V(10)                                                MSCC
      GO TO 14                                                           MSCC
   59 QQ = Z(ISTG)                                                       MSCC
   14 IF(W(7).GT..5.OR.V(66).GT.1.5.OR.(V(66).GT..5.AND.NSEC.EQ.1)) CALL MSCC
     1 PAROUT                                                            MSCC
      IF(ISTG) 65,15,67                                                  MSCC
   67 IF(ISTG.GT.7) GO TO 64                                             MSCC
      IF(COEF*(Y(ISTG)-STGV).GT.STGT) GO TO 53                           MSCC
      GO TO 15                                                           MSCC
   64 IF(COEF*(Z(ISTG)-STGV).GT.STGT) GO TO 53                           MSCC
      GO TO 15                                                           MSCC
   65 IF(X-STGV.GT.STGT) GO TO 53                                        MSCC
   15 IMAX = 0                                                           MSCC
      IMIN = 0                                                           MSCC
      DO 16 I=1,N                                                        MSCC
      Y1(I) = Y0(I) + H3*FD(I)                                           MSCC
   16 YS1(I)=SNGL(Y1(I))                                                 MSCC
      XX1 = X + H/3.                                                     MSCC
      CALL EQTNL(XX1,YS1,F1,H,0)                                         MSCC
      DO 17 I=1,N                                                        MSCC
      Y2(I) = Y0(I) + H6*(FD(I) + DBLE(F1(I)))                           MSCC
   17 YS2(I)=SNGL(Y2(I))                                                 MSCC
      CALL EQTNL(XX1,YS2,F2,H,0)                                         MSCC
      DO 18 I=1,N                                                        MSCC
      Y3(I) = Y0(I) + H8*(FD(I) + 3.*DBLE(F2(I)))                        MSCC
   18 YS3(I)=SNGL(Y3(I))                                                 MSCC
      XX2 = X + H/2.                                                     MSCC
      CALL EQTNL(XX2,YS3,F3,H,0)                                         MSCC
      DO 19 I=1,N                                                        MSCC
      Y4(I) = Y0(I) + H2*(FD(I) - 3.*DBLE(F2(I))+4.*DBLE(F3(I)))         MSCC
   19 YS4(I)=SNGL(Y4(I))                                                 MSCC
      XX3 = X + H                                                        MSCC
      CALL EQTNL(XX3,YS4,F4,H,0)                                         MSCC
      DO 20 I=1,N                                                        MSCC
      Y5(I) = Y0(I) + H6*(FD(I) + 4.*DBLE(F3(I))+DBLE(F4(I)))            MSCC
      YS5(I)=SNGL(Y5(I))                                                 MSCC
      ARGD = DABS(.2*(Y4(I) - Y5(I)))                                    MSCC
      ERROR(I) =SNGL(ARGD)                                               MSCC
      IF(JSTG.GT.0) GO TO 20                                             MSCC
      IF(ERROR(I).GT.TMAX(I)) GO TO 22                                   MSCC
      IF(ERROR(I).GT.TMIN(I)) IMIN = 1                                   MSCC
      GO TO 20                                                           MSCC
   22 ARG = H/2.                                                         MSCC
      IF(ARG.GE.HMIN .AND. NSEC.GT.NSECX) GO TO 23                       MSCC
      IMAX = 1                                                           MSCC
   20 CONTINUE                                                           MSCC
      IF(IMAX.GE.1) GO TO 55                                             MSCC
   56 IF( ABS(YS5(5)).LT.90.) GO TO 87                                   MSCC
C  ****  CROSSING THE POLE  ****                                         MSCC
      IF(YS5(5).LT.0.) GO TO 73                                          MSCC
      YS5(5)=180.-YS5(5)                                                 MSCC
      Y5(5) = 180. - Y5(5)                                               MSCC
      GO TO 74                                                           MSCC
   73 Y5(5) = -180. - Y5(5)                                              MSCC
      YS5(5)=-180.-YS5(5)                                                MSCC
   74 DO 81 L=4,6,2                                                      MSCC
      Y5(L) = Y5(L) + 180.                                               MSCC
      YS5(L)=YS5(L)+180.                                                 MSCC
   81 CONTINUE                                                           MSCC
   87 IF(Q(65,NSEC).GT..5) GO TO 72                                      MSCC
C  ****  CYCLE CHECK FOR AZIMUTH AND LONGITUDE  ****                     MSCC
      DO 82 L=4,6,2                                                      MSCC
      LQ = 25                                                            MSCC
   84 LQ = LQ - 1                                                        MSCC
      IF(YS5(L).LT.0.) GO TO 85                                          MSCC
      IF(YS5(L).LT.360.) GO TO 82                                        MSCC
      YS5(L)=YS5(L)-360.                                                 MSCC
      Y5(L) = Y5(L) - 360.                                               MSCC
      GO TO 86                                                           MSCC
   85 Y5(L) = Y5(L) + 360.                                               MSCC
      YS5(L)=YS5(L)+360.                                                 MSCC
   86 IF(LQ.GT.0) GO TO 84                                               MSCC
   82 CONTINUE                                                           MSCC
   72 CALL EQTNL(XX3,YS5,F5,H,1)                                         MSCC
      IF(W(32).GT..5) GO TO 57                                           MSCC
C  ****  STAGING LOGIC  ****                                             MSCC
      IF(ISTG.LE.0) GO TO 27                                             MSCC
      IF(ABS(TBCKP-XX3).LE.BCKPT.AND.COEF*(Z(ISTG)-STGV).LT.0..AND.ABS(Z MSCC
     1(ISTG)-STGV).GT.STGT) GO TO 29                                     MSCC
      IF(XX3.GT.TBCKP.AND.COEF*(Z(ISTG)-STGV).LT.0..AND.ABS(Z(ISTG)-STGV MSCC
     1).GT.STGT) GO TO 30                                                MSCC
      IF(KSTG.GT.0) GO TO 31                                             MSCC
      IF(ISTG-8) 41,33,33                                                MSCC
   55 WRITE(6,1001) NSEC, H, HMIN, (ERROR(I), I=1,N)                     MSCC
      IF(W(7).GT..5.OR.V(66).GT.1.5) GO TO 75                            MSCC
      SW2 = SW(2)                                                        MSCC
      SW(2) = 1.                                                         MSCC
      CALL PAROUT                                                        MSCC
      SW(2) = SW2                                                        MSCC
   75 IF(V(48).LT..5) GO TO 56                                           MSCC
      IF(W(38) .GT. V(48)) GO TO 57                                      MSCC
      W(38)=W(38)+1.                                                     MSCC
      GO TO 56                                                           MSCC
   41 IF(ABS(STGV-YS5(ISTG)).LE.STGT) GO TO 28                           MSCC
      IF(COEF*(YS5(ISTG)-STGV).GT.0.) GO TO 34                           MSCC
      IF(JSTG.GT.0) GO TO 35                                             MSCC
   36 X0 = X0 + H0                                                       MSCC
      X=SNGL(X0)                                                         MSCC
      DO 37 I=1,N                                                        MSCC
      Y(I) = YS5(I)                                                      MSCC
      Y0(I)=Y5(I)                                                        MSCC
      F0(I) = F5(I)                                                      MSCC
   37 FD(I)=DBLE(F0(I))                                                  MSCC
      IF(MOD(IPRNT,JPRNT).GT.0) GO TO 60                                 MSCC
      IF(V(66).GT.1.5.OR.W(7).GT..5) CALL PAROUT                         MSCC
   60 IPRNT = IPRNT + 1                                                  MSCC
      IF(Z(8).LE.-10000.) GO TO 57                                       MSCC
      IF(IMIN.GT.0) GO TO 15                                             MSCC
      IF(NSEC.GT.NSECX) H = SCOEF * H                                    MSCC
      GO TO 25                                                           MSCC
   57 N = 0                                                              MSCC
      GO TO 999                                                          MSCC
   23 H = H/2.                                                           MSCC
   25 H0=DBLE(H)                                                         MSCC
      H2 = H0/2.                                                         MSCC
      H3 = H0/3.                                                         MSCC
      H6 = H0/6.                                                         MSCC
      H8 = H0/8.                                                         MSCC
      GO TO 15                                                           MSCC
   27 IF(ABS(STGTV-XX3).LE.STGT) GO TO 28                                MSCC
      IF(XX3.GT.STGTV) GO TO 24                                          MSCC
      IF(JSTG) 36,36,21                                                  MSCC
   24 JSTG = 1                                                           MSCC
   21 IF(ICYC.LE.0) GO TO 26                                             MSCC
      H = H + STGTV - XX3                                                MSCC
   38 ICYC = ICYC - 1                                                    MSCC
      GO TO 25                                                           MSCC
   29 LOUT = 2                                                           MSCC
      GO TO 28                                                           MSCC
   30 KSTG = 1                                                           MSCC
   31 IF(KCYC.GT.0) GO TO 32                                             MSCC
      LOUT = 3                                                           MSCC
      GO TO 28                                                           MSCC
   34 JSTG = 1                                                           MSCC
   35 IF(ICYC.LE.0) GO TO 26                                             MSCC
      H = H - (YS5(ISTG) - STGV)/F5(ISTG)                                MSCC
      GO TO 38                                                           MSCC
   26 LOUT = 4                                                           MSCC
      GO TO 28                                                           MSCC
   32 H = H + TBCKP - XX3                                                MSCC
      KCYC = KCYC - 1                                                    MSCC
      GO TO 25                                                           MSCC
C  ****  EVALUATION OF THE NON STATE STAGING PARAMETERS  ****            MSCC
   33 PAR = Z(ISTG)                                                      MSCC
      IF(ABS(STGV-PAR).LE.STGT) GO TO 28                                 MSCC
      IF(COEF*(PAR-STGV).GT.0.) GO TO 44                                 MSCC
      IF(JSTG.GT.0) GO TO 45                                             MSCC
      QQ = PAR                                                           MSCC
      GO TO 36                                                           MSCC
   44 JSTG = 1                                                           MSCC
   45 IF(ICYC.LE.0) GO TO 26                                             MSCC
      FX = (PAR - QQ)/H                                                  MSCC
      H = H - (PAR - STGV)/FX                                            MSCC
      GO TO 38                                                           MSCC
   28 X = XX3                                                            MSCC
      DO 42 I=1,N                                                        MSCC
   42 Y(I) = YS5(I)                                                      MSCC
      IF(V(66).GT..5.OR.W(7).GT..5) CALL PAROUT                          MSCC
      GO TO (999,51,52,53), LOUT                                         MSCC
   51 WRITE(6,1002) NSEC, X, TBCKP, TBCKT, BCKPT, ISTG, STGV, STGT, COEF MSCC
      CALL PAROUT                                                        MSCC
      GO TO 999                                                          MSCC
   52 WRITE(6,1003) NSEC, X, TBCKP, TBCKT, BCKPT, ISTG, STGV, STGT, COEF MSCC
      CALL PAROUT                                                        MSCC
      GO TO 999                                                          MSCC
   53 WRITE(6,1004) NSEC, X, TBCKP, TBCKT, BCKPT, ISTG, STGV, STGT, COEF MSCC
      CALL PAROUT                                                        MSCC
  999 RETURN                                                             MSCC
      END                                                                MSCC
  ELT XNEW4,1,710302, 33689
  EOF "                                                                        "
      SUBROUTINE XNEW4(JFLAG,ICV,JCV,KA,KB,KI)                           XNEW4
C        GENERAL (2X2) ITERATION SCHEME                                  XNEW4
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
 1001 FORMAT(51H1   *****   SUCCESSFUL CONVERGENCE IN XNEW4   *****)     XNEW4
 1002 FORMAT(66H1   *****   EXCEEDED MAXIMUM NUMBER OF ITERATIONS IN XNE XNEW4
     1W4   *****)                                                        XNEW4
 1003 FORMAT(60H1   *****   CONTROL VARIABLE EXCEEDED LIMIT IN XNEW4   * XNEW4
     1****////11X,18H CONTROL VARIABLE ,I1,3H  =,E17.8,4X,10H LIMITS  =, XNEW4
     2E17.8,4H  TO,E17.8//11X,18H CONTROL VARIABLE ,I1,3H  =,E17.8,4X,10 XNEW4
     3H LIMITS  =,E17.8,4H  TO,E17.8)                                    XNEW4
 1004 FORMAT(70H1   *****   END CONDITIONS ARE INVARIANT TO CONTROL PARA XNEW4
     1METERS   *****)                                                    XNEW4
      MCYC = IFIX(V(ICV+56))                                             XNEW4
      ICYC = 1                                                           XNEW4
      JFLAG = 0                                                          XNEW4
      IPRTL = 0                                                          XNEW4
      W(10) =  .1                                                        XNEW4
      W(11) = W(11) + 1.                                                 XNEW4
      W(12) = 1.1                                                        XNEW4
      CALL CNTVR(1,ICV)                                                  XNEW4
      CALL CNTVR(1,JCV)                                                  XNEW4
   10 CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW4
      IF(W(30).GT..5) GO TO 999                                          XNEW4
      IF(KFLAG.GT.0) GO TO 11                                            XNEW4
      IF(ABS(EC(ICV)-V(ICV+51)).LE.V(ICV+31).AND.ABS(EC(JCV)-V(JCV+51)). XNEW4
     1LE.V(JCV+31)) GO TO 12                                             XNEW4
      IF(ICYC.GT.MCYC) GO TO 13                                          XNEW4
      X10 = CV(ICV)                                                      XNEW4
      X20 = CV(JCV)                                                      XNEW4
      Y10 = EC(ICV)                                                      XNEW4
      Y20 = EC(JCV)                                                      XNEW4
      DY1 = V(ICV+51) - Y10                                              XNEW4
      DY2 = V(JCV+51) - Y20                                              XNEW4
      IF(IPRTL.GT.0) GO TO 16                                            XNEW4
C        EVALUATE PARTIAL DERIVATIVES                                    XNEW4
      IPRTL = 1                                                          XNEW4
      X11 = X10 + V(ICV+22)                                              XNEW4
      X21 = X20 + V(JCV+22)                                              XNEW4
      H1 = V(ICV+22)**2                                                  XNEW4
      H2 = V(JCV+22)**2                                                  XNEW4
      CV(ICV) = X11                                                      XNEW4
      CALL CNTVR(2,ICV)                                                  XNEW4
      CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW4
      IF(W(30).GT..5) GO TO 999                                          XNEW4
      IF(KFLAG.GT.0) GO TO 11                                            XNEW4
      Y11 = EC(ICV)                                                      XNEW4
      Y21 = EC(JCV)                                                      XNEW4
      CALL CNTVR(3,ICV)                                                  XNEW4
      CALL CNTVR(4,ICV)                                                  XNEW4
      CV(JCV) = X21                                                      XNEW4
      CALL CNTVR(2,JCV)                                                  XNEW4
      CALL TRAJB(KFLAG,KA,KB,KI)                                         XNEW4
      IF(W(30).GT..5) GO TO 999                                          XNEW4
      IF(KFLAG.GT.0) GO TO 11                                            XNEW4
      Y12 = EC(ICV)                                                      XNEW4
      Y22 = EC(JCV)                                                      XNEW4
      CALL CNTVR(3,JCV)                                                  XNEW4
      CALL CNTVR(4,JCV)                                                  XNEW4
      C11 = Y11 - Y10                                                    XNEW4
      C21 = Y21 - Y20                                                    XNEW4
      C12 = Y12 - Y10                                                    XNEW4
      C22 = Y22 - Y20                                                    XNEW4
      D1  = X11 - X10                                                    XNEW4
      D2  = X21 - X20                                                    XNEW4
      A11 = C11/D1                                                       XNEW4
      A21 = C21/D1                                                       XNEW4
      A12 = C12/D2                                                       XNEW4
      A22 = C22/D2                                                       XNEW4
C        PREDICT NEW VALUES FOR CONTROL VARIABLES                        XNEW4
   14 ICYC = ICYC + 1                                                    XNEW4
      DA = A11*A22 - A21*A12                                             XNEW4
      IF(ABS(DA).LT..0000001) GO TO 997                                  XNEW4
      D1 = A22*DY1 - A12*DY2                                             XNEW4
      D2 = A11*DY2 - A21*DY1                                             XNEW4
      DX1 = D1/DA                                                        XNEW4
      DX2 = D2/DA                                                        XNEW4
      CV(ICV) = X10 + DX1                                                XNEW4
      CV(JCV) = X20 + DX2                                                XNEW4
      IF(CV(ICV).GT.V(ICV+25).OR.CV(JCV).GT.V(JCV+25)) GO TO 15          XNEW4
      IF(CV(ICV).LT.V(ICV+28).OR.CV(JCV).LT.V(JCV+28)) GO TO 15          XNEW4
      CALL CNTVR(2,ICV)                                                  XNEW4
      CALL CNTVR(2,JCV)                                                  XNEW4
      GO TO 10                                                           XNEW4
   16 CONTINUE                                                           XNEW4
C *****  ADJUST PARTIAL DERIVATIVES *****                                XNEW4
      SIG = DX1**2/H1 + DX2**2/H2                                        XNEW4
      A11 = A11 - DY1*DX1/SIG/H1                                         XNEW4
      A12 = A12 - DY1*DX2/SIG/H2                                         XNEW4
      A21 = A21 - DY2*DX1/SIG/H1                                         XNEW4
      A22 = A22 - DY2*DX2/SIG/H2                                         XNEW4
      GO TO 14                                                           XNEW4
   11 JFLAG = 1                                                          XNEW4
      GO TO 999                                                          XNEW4
C        SUCCESSFUL CONVERGENCE                                          XNEW4
   12 IF( SW(2).EQ.1.  .OR.  SW(16).NE.0. )                              XNEW4
     1WRITE(6,1001)                                                      XNEW4
      GO TO 999                                                          XNEW4
C        EXCEEDED MAXIMUM NUMBER OF ITERATIONS                           XNEW4
   13 WRITE(6,1002)                                                      XNEW4
      GO TO 998                                                          XNEW4
C        CONTROL VARIABLE EXCEEDED LIMIT                                 XNEW4
   15 WRITE(6,1003) (IJK, CV(IJK), V(IJK+28), V(IJK+25), IJK=ICV,JCV)    XNEW4
      GO TO 998                                                          XNEW4
C        END CONDITIONS ARE INVARIANT TO CONTROL PARAMETERS              XNEW4
  997 WRITE(6,1004)                                                      XNEW4
  998 W(30) = 1.1                                                        XNEW4
  999 RETURN                                                             XNEW4
      END                                                                XNEW4
  ELT ENDCN,1,710302, 33690
  EOF "                                                                        "
      SUBROUTINE ENDCN(LCV)                                              ENDCN
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      ISEND = IFIX(V(LCV+16))                                            ENDCN
      IF(ISEND) 22,21,20                                                 ENDCN
   22 EC(LCV) = T                                                        ENDCN
      GO TO 999                                                          ENDCN
   21 EC(LCV) = TR                                                       ENDCN
      GO TO 999                                                          ENDCN
   20 EC(LCV) = Z(ISEND)                                                 ENDCN
  999 RETURN                                                             ENDCN
      END                                                                ENDCN
  ELT PAROUT,1,710302, 33693
  EOF "                                                                        "
      SUBROUTINE PAROUT                                                  PAROUT
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/AERO/ZP21,ZP22,ZP23                                         PAROUT
 1001 FORMAT(4H ***,E16.8,5E20.8//6E20.8/6E20.8/6E20.8/6E20.8//6E20.8/6E PAROUT
     120.8/6E20.8/6E20.8/)                                               PAROUT
 1002 FORMAT(1H0/)                                                       PAROUT
 1003 FORMAT(6E20.8/3E20.8/)                                             PAROUT
 1004 FORMAT(6E20.8/6E20.8/)                                             PAROUT
 1005 FORMAT(F10.3,6F11.5)                                               PAROUT
 1006 FORMAT(F10.3,3F11.1,3F11.4)                                        PAROUT
 1007 FORMAT(6E20.8/6E20.8/5E20.8/6E20.8/)                               LT002
 1008 FORMAT(3E20.8/)                                                    PAROUT
 1009 FORMAT(6E20.8/)                                                    PAROUT
      IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              PAROUT
     1WRITE(6,1001) T, TR, Z(8), Z(5), Z(6), Z(7), Z(2), Z(3), Z(4), Z(4 PAROUT
     11), Z(42), Z(65), Z(39), Z(38), Z(1), Z(51), Z(50), Z(49), Z(11),  PAROUT
     2Z(12), Z(13), Z(43), Z(47), Z(48), ZP21 , ZP22 , ZP23 , Z(24), Z(2 PAROUT
     35), Z(26), Z(27), Z(32), Z(78), Z(44), Z(45), Z(46), Z(29), Z(30), PAROUT
     4 Z(31), Z(33), Z(34), Z(35), Z(9), Z(36), Z(37), Z(40), Z(16), Z(1 PAROUT
     55), Z(10), Z(14), Z(18), Z(19), Z(20), Z(17)                       PAROUT
      IF(NSEC.GT.1) GO TO 100                                            PAROUT
      IF(SQ(20,1).LE.0.) GO TO 100                                       PAROUT
      IF(SW(2).EQ.1..OR.SQ(1,2).NE.0.)                                   PAROUT
     1WRITE(6,1010) SQ(30,2),SQ(30,1),SQ(30,5),SQ(30,3) ,SQ(30,4),       PAROUT
     2 SQ(31,1)                                                          PAROUT
 1010 FORMAT(10X,15HMAIN THRUST =  E20.8,3X,14HAUX THRUST =  E20.8/      PAROUT
     1 3X,22HUNTHROTTLED THRUST =   E20.8/                               PAROUT
     1 10X,13HMAIN WDOT =  2X,E20.8,3X,12HAUX WDOT =  2X,E20.8/          PAROUT
     2 3X,20HUNTHROTTLED WDOT =   E22.8)                                 PAROUT
 1011 FORMAT(6E20.8/6E20.8/5E20.8/)                                      LT002
  100 CONTINUE                                                           PAROUT
      IF(SW(2).NE.1..AND.SQ(1,2).EQ.0.) GO TO 11                         LT002
      IF(Q(69,NSEC).LT..5) GO TO 11                                      PAROUT
      JSND = 1 + IFIX(Q(69,NSEC))                                        LT002
      GO TO (11,21,22,23), JSND                                          LT002
   21 WRITE(6,1008) Z(79), Z(80), Z(52)                                  LT002
      GO TO 11                                                           LT002
   22 IF(V(68).LT..5) GO TO 21                                           LT002
      WRITE(6,1009) Z(79), Z(80), Z(52), Z(82), Z(83), Z(81)             LT002
      GO TO 11                                                           LT002
   23 IF(V(68).LT..5) GO TO 21                                           LT002
      WRITE(6,1003) Z(79), Z(80), Z(52), Z(82), Z(83), Z(81), Z(95),     LT002
     1 Z(94), Z(93)                                                      LT002
   11 IF(Q(56,NSEC).LT..5) GO TO 12                                      PAROUT
      IF(Q(56,NSEC).GT.1.5) GO TO 13                                     PAROUT
      IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              PAROUT
     1WRITE(6,1011) Z(66), Z(67), Z(91), Z(74), Z(68), Z(72), Z(69), Z(7 LT002
     20), Z(71), Z(76), Z(77), Z(73), Z(96), Z(97), Z(98), Z(99), Z(100) LT002
      GO TO 12                                                           PAROUT
   13 IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              PAROUT
     1WRITE(6,1007) Z(66), Z(67), Z(91), Z(74), Z(68), Z(72), Z(69), Z(7 LT002
     20), Z(71), Z(76), Z(77), Z(73), Z(96), Z(97), Z(98), Z(99), Z(100) LT002
     3, Z(84), Z(85), Z(86), Z(87), Z(88), Z(89)                         LT002
   12 IF(V(56).LT..5) GO TO 999                                          PAROUT
      IF(SW(2).NE.1..AND.SQ(1,2).EQ.0.) GO TO 999                        LT002
      IF(V(56).GT.2.5) GO TO 10                                          PAROUT
      WRITE(6,1003) Z(53), Z(54), Z(55), Z(56), Z(57), Z(58), Z(59), Z(6 PAROUT
     10), Z(61)                                                          PAROUT
      IF(V(56).LT.1.5) GO TO 999                                         PAROUT
C  ****   TAPE OUTPUT   ****                                             PAROUT
      NDOT = 0.                                                          PAROUT
      WRITE(1) T, NDOT, (Z(I+58), I=1,3), NDOT, NDOT, NDOT, (Z(J+52), J= PAROUT
     11,6)                                                               PAROUT
      GO TO 999                                                          PAROUT
   10 WRITE(6,1004) Z(53), Z(54), Z(55), Z(56), Z(57), Z(58), Z(59), Z(6 PAROUT
     10), Z(61), Z(62), Z(63), Z(64)                                     PAROUT
      IF(V(56).LT.3.5) GO TO 999                                         PAROUT
C  ****   CARD OUTPUT   ****                                             PAROUT
      PUNCH 1005, T, Z(59), Z(60), Z(61), Z(62), Z(63), Z(64)            PAROUT
      PUNCH 1006, T, Z(53), Z(54), Z(55), Z(56), Z(57), Z(58)            PAROUT
  999 IF( SW(2).EQ.1.  .OR. SQ(1,2).NE.0. )                              PAROUT
     1WRITE(6,1002)                                                      PAROUT
      RETURN                                                             PAROUT
      END                                                                PAROUT
  ELT ANGLE,1,710302, 33697
  EOF "                                                                        "
      SUBROUTINE ANGLE                                                   ANGLE
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/LTS/WW(5)                                                   ANGLE
 1001 FORMAT(83H0 ****   FAILURE IN THE TABLE LOOK-UP OF SUBROUTINE ANGL ANGLE
     1E DURING SIMULATION SECTION,I3,7H   ****///)                       ANGLE
      W(31) = .1                                                         ANGLE
      TEST1 = .0000001                                                   ANGLE
      TEST2 = .9999999                                                   ANGLE
      IF(W(6).GT..5) GO TO 45                                            ANGLE
C  ****  INITIALIZATION  ****                                            ANGLE
      ISEND = IFIX(Q(33,NSEC))                                           ANGLE
      KSEND = IFIX(Q(32,NSEC))                                           ANGLE
      LSEND = IFIX(Q(34,NSEC))                                           ANGLE
C  ****  ROLL RATE CONTROL  ****                                         ANGLE
      GO TO (41,42,44,44,44), KSEND                                      ANGLE
   45 GO TO (46,46,44,44,44), KSEND                                      ANGLE
   41 SIG0 = Q(44,NSEC)                                                  ANGLE
      GO TO 46                                                           ANGLE
   42 SIG0 = Z(11) + Q(44,NSEC)                                          ANGLE
   46 Z(11) = Q(36,NSEC)*TR + SIG0                                       ANGLE
C  ****  YAW ANGLE OF ATTACK RATE CONTROL  ****                          ANGLE
   44 IF(W(6).GT..5) GO TO 49                                            ANGLE
      GO TO (47,48,83,84,47), LSEND                                      LT002
   47 XLM0 = Q(46,NSEC)                                                  LT002
      GO TO 49                                                           LT002
   48 XLM0 = Z(13) + Q(46,NSEC)                                          LT002
   49 Z(13) = Q(38,NSEC)*TR + XLM0                                       LT002
      GO TO 82                                                           LT002
C  ****  SPECIFIED ROLL AXIS AZIMUTH  ****                               LT002
   83 XDL0 = Q(46,NSEC)                                                  LT002
      GO TO 82                                                           LT002
   84 IF(ABS(Z(13)).LT.TEST1) GO TO 83                                   LT002
      PSIP = 90. - Z(12) - Z(3)                                          LT002
      IF(ABS(PSIP).LT.TEST1.OR.ABS(180.-PSIP).LT.TEST1) GO TO 83         LT002
      ARG = 90. - ABS(Z(13))                                             LT002
      IF(ABS(ARG).LT.TEST1) GO TO 88                                     LT002
      ARG = TAN(Z(13)/V(45))/SIN(PSIP/V(45))                             LT002
      CALL QARG(ARG,XLMH,3,0)                                            LT002
      CALL QUAD(Z(13),XLM0,2,10)                                         LT002
      IF(ABS(XLM0).LE.90.) GO TO 85                                      LT002
      XLMH = 180. - XLMH                                                 LT002
      CALL QUAD(XLMH,XLMH,2,10)                                          LT002
      GO TO 85                                                           LT002
   88 XLMH = Z(13)                                                       LT002
   85 XDL0 = Z(4) + XLMH + Q(46,NSEC)                                    LT002
C  ****  PITCH ANGLE OF ATTACK RATE CONTROL  ****                        LT002
   82 IF(W(6).GT..5) GO TO 52                                            LT002
      GO TO (50,51,54,50,51,53,30,61,67,61,67,61,67,61,67,61,67,90,90,   LT002
     190,90,100,101,100,101,100,101,100,101,100,101), ISEND              LT002
   52 GO TO (29,29,26,29,29,26,30,62,62,62,62,62,62,62,62,62,62,91,91,   LT002
     191,91,110,110,110,110,110,110,110,110,110,110), ISEND              LT002
   50 ALP0 = Q(45,NSEC)                                                  LT002
      GO TO 29                                                           LT002
   51 ALP0 = Z(12) + Q(45,NSEC)                                          LT002
   29 Z(12) = Q(37,NSEC)*TR + ALP0                                       LT002
      GO TO 80                                                           LT002
  100 ALP0 = Q(45,NSEC)                                                  LT002
      GO TO 102                                                          LT002
  101 ALP0 = Z(12) + Q(45,NSEC)                                          LT002
  102 ITBL = (ISEND-20)/2                                                LT002
      ITRIP = 2                                                          LT002
      JMAX = IFIX(XNPT(ITBL))                                            LT002
      IF(NSEC-1) 103, 103, 110                                           LT002
  103 Z(8) = V(8)                                                        LT002
      CALL ATMOS                                                         LT002
      IF(Z(37)-TEST1) 104, 104, 105                                      LT002
  104 Z(40) = 0.                                                         LT002
      GO TO 110                                                          LT002
  105 Z(40) = Z(2)/Z(37)                                                 LT002
  110 IF(Z(40).GT.PT(ITRIP,ITBL)) GO TO 111                              LT002
      JSTOP = ITRIP - 1                                                  LT002
      DO 114 J=1,JSTOP                                                   LT002
      I = ITRIP - J + 1                                                  LT002
      IF(Z(40).GE.PT(I-1,ITBL)) GO TO 113                                LT002
  114 CONTINUE                                                           LT002
      GO TO 997                                                          LT002
  111 JSTOP = JMAX - ITRIP                                               LT002
      IF(JSTOP.LE.0) GO TO 997                                           LT002
      DO 112 J=1,JSTOP                                                   LT002
      I = ITRIP + J                                                      LT002
      IF(Z(40).LE.PT(I,ITBL)) GO TO 113                                  LT002
  112 CONTINUE                                                           LT002
  997 ITRIP = 2                                                          LT002
      Z(12) = ALP0                                                       LT002
      WRITE(6,1001) NSEC                                                 LT002
      W(32) = 1.1                                                        LT002
      CALL PAROUT                                                        LT002
      W(32) = 1.1                                                        LT002
      GO TO 999                                                          LT002
  113 ITRIP = 1                                                          LT002
      ARG = (Z(40) - PT(I-1,ITBL))/(PT(I,ITBL) - PT(I-1,ITBL))           LT002
      Z(12) = ALP0 + Q(37,NSEC)*TR + PDT(I-1,ITBL) + ARG*(PDT(I,ITBL) -  LT002
     1 PDT(I-1,ITBL))                                                    LT002
      GO TO 80                                                           ANGLE
   90 KA = IFIX(WW(5))                                                   ANGLE
      IF(NSEC.GT.KA) GO TO 91                                            ANGLE
      KARG = ISEND - 17                                                  ANGLE
      GO TO (92,93,94,95), KARG                                          ANGLE
   92 ARG = Q(43,KA)                                                     ANGLE
      GO TO 96                                                           ANGLE
   93 ARG = 90. - Z(3)                                                   ANGLE
      GO TO 96                                                           ANGLE
   94 ARG = Z(43)                                                        ANGLE
   96 ARG = (ARG + Q(45,KA))/V(45)                                       ANGLE
      IF(ABS(ARG).LT.TEST1) GO TO 74                                     ANGLE
      WW(3) = 1./TAN(ARG)                                                ANGLE
      GO TO 75                                                           ANGLE
   74 WW(3) = V(44)*.5                                                   ANGLE
   75 IF(ABS(Q(35,KA)).LT.TEST1) GO TO 97                                ANGLE
      ARG = Q(35,KA)/V(45)                                               ANGLE
      ARG = 1./TAN(ARG)                                                  ANGLE
      GO TO 98                                                           ANGLE
   97 ARG = V(44)*.5                                                     ANGLE
   98 WW(4) = (ARG - WW(3))/(WW(2) - WW(1))                              ANGLE
      Q(37,KA) = WW(2) - WW(1)                                           ANGLE
      GO TO 91                                                           ANGLE
   95 WW(3) = Q(43,KA)                                                   ANGLE
      WW(4) = Q(45,KA)                                                   ANGLE
   91 ARG = WW(3) + WW(4)*(T-WW(1))                                      ANGLE
      IF(ABS(ARG).LT.TEST1) GO TO 76                                     ANGLE
      ARG = 1./ARG                                                       ANGLE
      CALL QARG(ARG,Z(43),3,0)                                           ANGLE
      IF(Z(43).LT.0.) Z(43) = Z(43) + 180.                               ANGLE
      GO TO 77                                                           ANGLE
   76 Z(43) = 90.                                                        ANGLE
   77 Z(12) = 90. - Z(3) - Z(43)                                         ANGLE
   80 IF(LSEND.LT.3) GO TO 69                                            ANGLE
C  ****  SPECIFIED ROLL AXIS AZIMUTH  ****                               LT002
      XLMH = Q(38,NSEC)*TR + XDL0 - Z(4)                                 LT002
      CALL QUAD(XLMH,XLMH,2,10)                                          LT002
      PSIP = 90 - Z(12) - Z(3)                                           LT002
      IF(ABS(PSIP).LT.TEST1.OR.ABS(180.-PSIP).LT.TEST1) GO TO 86         LT002
      ARG = 90. - ABS(XLMH)                                              LT002
      IF(ABS(ARG).LT.TEST1) GO TO 86                                     LT002
      ARG = SIN(PSIP/V(45))*TAN(XLMH/V(45))                              LT002
      CALL QARG(ARG,Z(13),3,0)                                           LT002
      IF(ABS(XLMH).LE.90.) GO TO 87                                      LT002
      Z(13) = 180. - Z(13)                                               LT002
      CALL QUAD(Z(13),Z(13),2,10)                                        LT002
      GO TO 87                                                           LT002
   86 Z(13) = XLMH                                                       LT002
   87 Z(11) = 0.                                                         LT002
   69 GO TO (30,30,999,999,999,999,30,30,30,30,30,30,30,30,30,30,30,70,  LT002
     1 70,70,70,30,30,30,30,30,30,30,30,30,30), ISEND                    LT002
C  ****  COMPUTATION OF PSI (PITCH ATTITUDE)  ****                       LT002
   30 IF(ABS(Z(11)).LT.TEST1) GO TO 12                                   LT002
C  ****  NON-ZERO ROLL ANGLE  ****                                       ANGLE
      ARG6 = (90. - Z(3))/V(45)                                          ANGLE
      ARG1 = Z(11)/V(45)                                                 ANGLE
      ARG2 = Z(12)/V(45)                                                 ANGLE
      COS1 = COS(ARG1)                                                   ANGLE
      SIN2 = SIN(ARG2)                                                   ANGLE
      COS2 = COS(ARG2)                                                   ANGLE
      SIN6 = SIN(ARG6)                                                   ANGLE
      COS6 = COS(ARG6)                                                   ANGLE
      IF(ABS(Z(12)).LT.TEST1) GO TO 60                                   LT002
      ARGT = COS6*COS2 + SIN6*SIN2*COS1                                  LT002
      CALL QARG(ARGT,ARGS,2,0)                                           LT002
      IF(ABS(Z(13)).LT.TEST1) GO TO 19                                   LT002
C  ****  NON-ZERO ROLL ANGLE, NON-ZERO YAW ANGLE  ****                   ANGLE
      ARG3 = Z(13)/V(45)                                                 ANGLE
      COS3 = COS(ARG3)                                                   ANGLE
      ARG7 = ARGS/V(45)                                                  ANGLE
      SIN7 = SIN(ARG7)                                                   ANGLE
      COS7 = ARGT                                                        ANGLE
      ARGD = SIN7*SIN2                                                   ANGLE
      ARGN = COS6 - COS7*COS2                                            ANGLE
C  ****  TRANSCENDENTAL FUNCTION ARGUMENT CHECK  ****                    ANGLE
      IF(ABS(ARGD).LE.ABS(ARGN)-TEST1) GO TO 21                          LT002
      SIN3 = SIN(ARG3)                                                   ANGLE
      COS5 = ARGN/ARGD                                                   ANGLE
      ARG5 = ACOS(COS5)                                                  ANGLE
      SIN5 = SIN(ARG5)                                                   ANGLE
      ARGT = COS7*COS3 - SIN7*SIN3*SIN5                                  ANGLE
      GO TO 20                                                           ANGLE
   21 ARGT = COS7*COS3                                                   ANGLE
      GO TO 20                                                           ANGLE
C  ****  NON-ZERO ROLL ANGLE, ZERO PITCH ANGLE OF ATTACK  ****           ANGLE
   60 SIN1 = SIN(ARG1)                                                   ANGLE
      ARG3 = Z(13)/V(45)                                                 ANGLE
      SIN3 = SIN(ARG3)                                                   ANGLE
      COS3 = COS(ARG3)                                                   ANGLE
      ARG = COS6*COS3 - SIN6*SIN3*SIN1                                   ANGLE
      Z(43) = V(45)*ACOS(ARG)                                            ANGLE
      GO TO 999                                                          ANGLE
C  ****  NON-ZERO ROLL  ANGLE, ZERO YAW ANGLE  ****                      ANGLE
   19 Z(43) = ARGS                                                       ANGLE
      GO TO 999                                                          ANGLE
C  ****  ZERO ROLL ANGLE  ****                                           ANGLE
   12 IF(ABS(Z(13)).LT.TEST1) GO TO 13                                   LT002
C  ****  ZERO ROLL ANGLE, NON-ZERO YAW ANGLE  ****                       ANGLE
      PAR8 = 90. - Z(3) - Z(12)                                          ANGLE
      COS3 = COS(Z(13)/V(45))                                            ANGLE
      COS6 = COS(PAR8/V(45))                                             ANGLE
      ARGT = COS6*COS3                                                   ANGLE
   20 CALL QARG(ARGT,Z(43),2,0)                                          LT002
      GO TO 999                                                          ANGLE
C  ****  ZERO ROLL ANGLE, ZERO YAW ANGLE  ****                           ANGLE
   13 Z(43) = 90. - Z(3) - Z(12)                                         ANGLE
      GO TO 999                                                          ANGLE
C  ***  PSI-DOT CONTROL, ZERO ROLL ANGLE ****                            ANGLE
   54 PSI0 = Z(43) + Q(43,NSEC)                                          ANGLE
      GO TO 26                                                           ANGLE
   53 PSI0 = Q(43,NSEC)                                                  ANGLE
   26 Z(43) = Q(35,NSEC)*Q(62,NSEC)*TR + PSI0                            ANGLE
      Z(78) = Q(35,NSEC)*Q(62,NSEC)                                      ANGLE
      GO TO 70                                                           ANGLE
C  ****  PITCH RATE TABLE  ****                                          ANGLE
   61 PSFLG = 1.                                                         LT002
      GO TO 68                                                           LT002
   67 PSFLG = 0.                                                         LT002
   68 KSEC = IFIX(Q(63,NSEC))                                            LT002
      PST(1) = Q(43,NSEC)                                                LT002
      IF(PSFLG.GT..5) PST(1) = PST(1) + PS(KSEC)                         LT002
      ITBL = (ISEND - 6)/2                                               LT002
      ITRIP = 2                                                          ANGLE
      JMAX = IFIX(XNPT(ITBL))                                            ANGLE
      IF(KSEC.LT.1) KSEC = 1                                             ANGLE
      DO 73 L=2,JMAX                                                     ANGLE
   73 PST(L) = Q(62,NSEC)*PDT(L-1,ITBL)*(PT(L,ITBL) - PT(L-1,ITBL)) +    ANGLE
     1 PST(L-1)                                                          ANGLE
   62 ARGT = T - TS(KSEC) - Q(64,NSEC)                                   ANGLE
      IF(ARGT.LT.PT(1,ITBL).OR.ARGT.GT.PT(JMAX,ITBL)) GO TO 71           ANGLE
      IF(ARGT.GT.PT(ITRIP,ITBL)) GO TO 72                                ANGLE
      JSTOP = ITRIP - 1                                                  ANGLE
      DO 65 J=1,JSTOP                                                    ANGLE
      I = ITRIP - J + 1                                                  ANGLE
      IF(ARGT.GE.PT(I-1,ITBL)) GO TO 64                                  ANGLE
   65 CONTINUE                                                           ANGLE
  998 WRITE(6,1001) NSEC                                                 ANGLE
      W(32) = 1.1                                                        ANGLE
   71 Z(12) = Q(45,NSEC)                                                 ANGLE
      W(31) = 1.1                                                        ANGLE
      GO TO 80                                                           LT002
   72 JSTOP = JMAX - ITRIP                                               ANGLE
      IF(JSTOP.LE.0) GO TO 998                                           ANGLE
      DO 63 J=1,JSTOP                                                    ANGLE
      I = ITRIP + J                                                      ANGLE
      IF(ARGT.LE.PT(I,ITBL)) GO TO 64                                    ANGLE
   63 CONTINUE                                                           ANGLE
      GO TO 998                                                          ANGLE
   64 ITRIP = I                                                          ANGLE
      Z(43) = PST(I-1) + Q(62,NSEC)*PDT(I-1,ITBL)*(ARGT - PT(I-1,ITBL))  ANGLE
      Z(78) = PDT(I-1,ITBL)*Q(62,NSEC)                                   ANGLE
   70 Z(11) = 0.                                                         ANGLE
      IF(LSEND.LT.3) GO TO 81                                            LT002
C  ****  SPECIFIED ROLL AXIS AZIMUTH  ****                               LT002
      XLMH = Q(38,NSEC)*TR + XDL0 - Z(4)                                 LT002
      CALL QUAD(XLMH,XLMH,2,10)                                          LT002
      IF(ABS(XLMH).LT.TEST1.OR.ABS(XLMH).GT.180.-TEST1) GO TO 89         LT002
      ARG = 90. - ABS(XLMH)                                              LT002
      IF(ABS(ARG).LT.TEST1) GO TO 89                                     LT002
      ARG = SIN(XLMH/V(45))*SIN(Z(43)/V(45))                             LT002
      CALL QARG(ARG,Z(13),1,0)                                           LT002
      IF(ABS(XLMH).LE.90.) GO TO 81                                      LT002
      Z(13) = 180. - Z(13)                                               LT002
      CALL QUAD(Z(13),Z(13),2,10)                                        LT002
      GO TO 81                                                           LT002
   89 Z(13) = XLMH                                                       LT002
   81 IF(ABS(Z(13)).GT.TEST1) GO TO 25                                   LT002
C  ****  ZERO ROLL ANGLE, ZERO YAW ANGLE  ****                           ANGLE
      Z(12) = 90. - Z(3) - Z(43)                                         ANGLE
      GO TO 999                                                          ANGLE
C  ****  ZERO ROLL ANGLE, NON-ZERO YAW ANGLE  ****                       ANGLE
   25 ARG3 = Z(13)/V(45)                                                 ANGLE
      COS3 = COS(ARG3)                                                   ANGLE
      ARG8 = Z(43)/V(45)                                                 ANGLE
      COS8 = COS(ARG8)                                                   ANGLE
C  ****  TRANSCENDENTAL FUNCTION ARGUMENT CHECK  ****                    ANGLE
      IF(ABS(COS8).LE.ABS(COS3)-TEST1) GO TO 22                          LT002
      IF(ABS(COS8).GT.ABS(COS3)+TEST1) GO TO 999                         LT002
      IF(SIGN(COS8,COS3).LT.0.) GO TO 23                                 ANGLE
      Z(12) = 90. - Z(3)                                                 ANGLE
      GO TO 999                                                          ANGLE
   23 Z(12) = -90. - Z(3)                                                ANGLE
      GO TO 999                                                          ANGLE
   22 Z(12) = 90. - Z(3) - V(45)*ACOS(COS8/COS3)                         ANGLE
C  ****  EXIT  ****                                                      ANGLE
  999 W(6) = 1.1                                                         ANGLE
      RETURN                                                             ANGLE
      END                                                                ANGLE
  ELT WTVOL,1,710302, 33701
  EOF "                                                                        "
      SUBROUTINE WTVOL                                                   U1108
C     OVERLAY(TTSS,3,0)                                                  U1108
C     PROGRAM WTVOL                                                      U1108
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        WTVOL
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                WTVOL
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        WTVOL
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                WTVOL
      COMMON/ORBINX/                                                     WTVOL
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     WTVOL
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, WTVOL
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, WTVOL
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, WTVOL
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       WTVOL
      COMMON/ORBINY/                                                     WTVOL
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     WTVOL
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, WTVOL
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, WTVOL
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, WTVOL
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       WTVOL
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  WTVOL
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QMX     ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      COMMON/TAMP/WGROSO,OTTOT,WFUOXO,TBTO,BTTOT                         WTVOL
      COMMON/OS/OSPLAN                                                   WTVOL
      BTWTOL=SW(18)*.5                                                   WTVOL
      QMX=SE(9)                                                          JDA1
      WOREQ= SQ(10,1)                                                    JDA1
      WPOREQ = SQ(13,1)                                                  JDA1
      GWREQ= SQ(16,1)                                                    JDA1
      IF(SW(3).GE.1.) GO TO 40                                           JDA1
      SQ(15,2)=1.                                                        JDA1
   40 CONTINUE                                                           JDA1
      SW(3)=SW(3)+1.                                                     JDA1
      BIB=.00005                                                         JDA1
      BOB=.00025                                                         JDA1
      ILAST=0                                                            JDA1
      W(36)=.1                                                           JDA1
      GUS = 0.                                                           WTVOL
      ACEL=0.                                                            JDA4
      ACNT=0.                                                            JDA4
  101 CONTINUE                                                           WTVOL
      ACNT=ACNT+1.                                                       JDA4
      CALL ORBCAL                                                        WTVOL
C      FIXED THRUST-TO-WEIGHT                                            WTVOL
      ISP(3) = TO27(3)                                                   WTVOL
      JUMP = 0                                                           WTVOL
      CALL WTSCH                                                         WTVOL
      CALL SOLVE                                                         WTVOL
      VBODY1 = VBODY                                                     WTVOL
      WGROSO=WGROSS                                                      WTVOL
      WFUOXO=WFUOX                                                       WTVOL
      OTTOT=TTOT                                                         WTVOL
      OSPLAN = SPLAN                                                     WTVOL
      BURN = T                                                           WTVOL
      GO TO 291                                                          WTVOL
  195 CONTINUE                                                           WTVOL
      CALL BOOCAL                                                        WTVOL
  196 IF( SE(6) .EQ. 0.) GO TO 200                                       WTVOL
C      FIXED THRUST-TO-WEIGHT                                            WTVOL
  197 SCB(129) = 0.                                                      WTVOL
      C(129) = 0.                                                        WTVOL
      CTHRST = CTHRST*SE(1)/SE(3)                                        WTVOL
      TB18 = CTHRST                                                      WTVOL
      GO TO 210                                                          WTVOL
C      FIXED THRUST                                                      WTVOL
  200 CTHRST = 0.                                                        WTVOL
      TB18 = 0.                                                          WTVOL
      TBTO = SW(6) * TB36/TO36                                           WTVOL
      SCB(129) = OTTOT*TBTO/TB36                                         WTVOL
      C(129) = SCB(129)                                                  WTVOL
  210 ISP(3) = TB27(3)                                                   WTVOL
      JUMP = 1                                                           WTVOL
      BURN = SW(20)                                                      WTVOL
      CALL WTSCH                                                         WTVOL
      CALL SOLVE                                                         WTVOL
      BTTOT = TTOT                                                       WTVOL
      VBODY2 = VBODY                                                     WTVOL
  269 TB51= VBODY2                                                       WTVOL
      TO51 = VBODY1                                                      WTVOL
      TB56 = WGROSS                                                      WTVOL
      TO56 = WGROSO                                                      WTVOL
  291 CONTINUE                                                           WTVOL
      IF(ILAST.NE.1  .AND. SW(16) . EQ. 0.) GO TO 292                    JDA1
      CALL PRINTW                                                        WTVOL
      CALL PRINTV                                                        WTVOL
      CALL PRWTSM                                                        WTVOL
  292 CONTINUE                                                           WTVOL
      IF(JUMP.EQ.1) GO TO 300                                            WTVOL
      CALL ORBSUM                                                        WTVOL
      CALL ORBSTO                                                        WTVOL
      GO TO 195                                                          WTVOL
  300 CONTINUE                                                           WDH2
      C(3) = SCB(3)                                                      WTVOL
      C(5) = SCB(5)                                                      WTVOL
      C(7) = SCB(7)                                                      WTVOL
      C(146) = SCB(146)                                                  WTVOL
      C(31) = SCB(31)                                                    WTVOL
      C(56) = SCB(56)                                                    WTVOL
      C(129) = SCB(129)                                                  WTVOL
      C(211)=SCB(211)                                                    WTVOL
      C(67) = SCB(67)                                                    WTVOL
      IF(SE(6).EQ.0.) GO TO 400                                          WTVOL
      CTHRST = CTHRST*SE(3)/SE(1)                                        WTVOL
  400 CALL BOOSUM                                                        WTVOL
      CALL BOOSTO                                                        WTVOL
      CALL TAMPER(1)                                                     WTVOL
      TWO = OTTOT/TO56                                                   WTVOL
      WRITE (6,1000) TO34(3),TO56,OTTOT, TWO,TB34(3),TB56,Q(1,1),SV(13)  WTVOL
      IF(ILAST.EQ.1) GO TO 950                                           JDA1
      IF(                SE(6).EQ.1. ) GO TO 500                         WTVOL
      IF(ACNT.GE.SW(19)) GO TO 500                                       JDA4
C  ***  THIS LOOP ADJUSTS CTHRST (ORBITER T/W) TO OBTAIN                 JDA1
C       SPECIFIED LIFTOFF T/W  ***                                       JDA1
      IF(SW(2).EQ.1.) BTWTOL=SW(18)                                      WTVOL
      IF( ABS(SV(13)-SW(17)) .LE. BTWTOL ) GO TO 500                     WTVOL
      TO18 = TO18/SV(13) * SW(17)                                        WTVOL
      GO TO 101                                                          WTVOL
  500 CONTINUE                                                           JDA1
      ACNT=0.                                                            JDA4
      ACEL=ACEL+1.                                                       JDA4
      IF(GWREQ.LE.0.) GO TO 800                                          JDA1
C  ***  THIS LOOP ADJUSTS PAYLOAD WEIGHT TO OBTAIN                       JDA1
C       SPECIFIED GROSS LIFTOFF WEIGHT  ***                              JDA1
      DIFF=GWREQ-TB56                                                    JDA1
      TOM=DIFF/GWREQ                                                     JDA1
      IF(ABS(TOM) .LT.BIB ) GO TO 504                                    JDA1
      IF(ACEL.GT.1.) GO TO 502                                           JDA1
      SLOPE=-21. 1                                                       JDA1
      IF(SW(3) .GT.1. .OR. GUS.GT.0.) SLOPE=SW(8)                        JDA1
      GO TO 505                                                          JDA1
  502 SLOPE = (DIFF - SDIFF)/(SCO(103) - SAPAY)                          JDA1
  505 CONTINUE                                                           JDA1
      WRITE(6,1001) SCO(103),DIFF,SLOPE                                  JDA1
      SW(8) = SLOPE                                                      JDA1
      SDIFF = DIFF                                                       JDA1
      SAPAY = SCO(103)                                                   JDA1
      SCO(103) = SCO(103) - DIFF/SLOPE                                   JDA1
      IF(ACEL.GT.6.) GO TO 503                                           JDA1
      GO TO 101                                                          JDA1
  503 WRITE(6,1002)                                                      JDA1
      GO TO 600                                                          JDA1
  504 WRITE(6,1001) SCO(103),DIFF,SW(8)                                  JDA1
      TOM = DIFF/GWREQ                                                   JDA1
      WRITE(6,1003) TOM                                                  JDA1
      GO TO 600                                                          JDA1
  800 CONTINUE                                                           JDA1
      IF(SE(6).EQ.1..OR.SW(19).GT.0.)  GO TO 600                         JDA1
C  *****THIS LOOP ADJUSTS ORBITER MR(3) TO COMPENSATE FOR CHANGE IN T/W  JDA1
C       AT LIFTOFF.        *****                                         JDA1
      SQ(15,1)=SQ(15,2)                                                  JDA1
      SQ(15,2)=SV(13)-1.                                                 JDA11
C       SV(13) IS LIFTOFF THRUST-TO-WEIGHT                               JDA11
      IF(ACEL.GE.2.) GO TO 600                                           JDA11
      IF(ACEL.EQ.1..AND.SW(3).LE.1..AND.GUS.EQ.0.) GO TO 600             JDA1
      DIFF= SQ(15,2)-SQ(15,1)                                            JDA1
      IF(ABS(DIFF).LT.BIB) GO TO 600                                     JDA11
      SLOPE=500. /SE(19)/ 32.174                                         JDA1
      X=TO34(3)*SLOPE/SQ(15,2) - .2                                      JDA11
C       THE CONSTANT -.2 REFLECTS WEIGHT REDUCTION DUE TO QMAX DECREASE  JDA11
C  *****  X IS AN ESTIMATE OF THE FEEDBACK OF T/W VARIATIONS             JDA1
C         THROUGH CHANGES IN MUO AND QMAX.  *****                        JDA1
      IF(X.GE..88) GO TO 803                                             JDA11
      IF(X.GT..44)  X=.44                                                JDA11
      DTWT=-DIFF/SQ(15,1)/SQ(15,2)/(1.-X)                                JDA1
      DTWT = DIFF/ (1.-X)                                                JDA11
      RATIO = 1. + DTWT / SQ(15,2)                                       JDA11
      OLD=TO34(3)                                                        JDA1
      TO34(3) = OLD * RATIO**(-2.*SLOPE)                                 JDA11
      DMU= TO34(3)-OLD                                                   JDA1
      WRITE(6,1004) DMU,X,DTWT                                           JDA11
C  *****  ADJUST THE QMAX ESTIMATE  *****                                JDA1
      SE(9)=SE(9)+SE(7)*DTWT                                             JDA1
      QMX=SE(9)                                                          JDA1
      GO TO 101                                                          JDA1
  803 WRITE(6,1008)                                                      JDA1
      W(36)= 1.1                                                         JDA1
 1008 FORMAT(5X,50H ******* RUN ABORTED IN WTVOL, FIXED THRUST LOW    )  JDA1
      GO TO 900                                                          JDA1
C                                                                        JDA11
  600 CONTINUE                                                           JDA1
      IF(ACEL.GT.6.) GO TO 900                                           JDA1
      ACEL = 0.                                                          JDA1
      IF(WOREQ.LE.0.) GO TO 700                                          JDA1
C  ***  THIS LOOP ADJUSTS BOOSTER MASS RATIO TO OBTAIN                   JDA1
C       SPECIFIED ORBITER GROSS WEIGHT.  ***                             JDA1
      DW=WOREQ-TO56                                                      JDA1
      ERR=DW/WOREQ                                                       JDA1
      IF(ABS(ERR) .LT. BOB) GO TO 604                                    JDA1
      IF(GUS.GT.0.) GO TO 602                                            JDA1
      S=  .54 *TO56 * TO34(3)/TB34(3)                                    JDA1
      IF(SW(3).GT.1.) S = SQ(11,1)                                       JDA1
      GUS=0.                                                             JDA1
      GO TO 605                                                          JDA1
  602 S = (D W-SD W)/(TB34(3)-SMR)                                       JDA1
  605 WRITE(6,1005) D W,S                                                JDA1
      SQ(11,1) = S                                                       JDA1
      SD W = D W                                                         JDA1
      SMR = TB34(3)                                                      JDA1
      TB34(3) = TB34(3) - D W/S                                          JDA1
      RPAR=SQ(19,3)                                                      JDA1
      IF(RPAR.GT.100.)SCB(214)=SCB(214)+ SE(8)*(TB34(3)-SMR) /RPAR       JDA1
      TO34(3)= TO34(3)*SMR / TB34(3)                                     JDA1
      IF(GUS.GT.6.) GO TO 603                                            JDA1
      GUS = GUS + 1.                                                     JDA1
      GO TO 101                                                          JDA1
  603 WRITE(6,1002)                                                      JDA1
  604 WRITE(6,1005) DW   ,SQ(11,1)                                       JDA1
      GO TO 900                                                          JDA1
  700 IF(WPOREQ.LE.0.) GO TO 900                                         JDA1
C  ***  THIS LOOP ADJUSTS BOOSTER MASS RATIO TO OBTAIN                   JDA1
C       SPECIFIED ORBITER PROPELLANT WEIGHT                              JDA1
C       INCLUDES FPR, EXCLUDES ON-ORBIT DELTA V   ***                    JDA1
      DW=WPOREQ-WFUOXO                                                   JDA1
      ERR=DW/WPOREQ                                                      JDA1
      IF(ABS(ERR) .LE. BOB) GO TO 704                                    JDA1
      IF(GUS.GT.0.) GO TO 702                                            JDA1
      S=  .690*WFUOXO*TO34(3) / TB34(3)                                  JDA1
      IF(SW(3).GT.1.) S = SQ(11,1)                                       JDA1
      GUS=0.                                                             JDA1
      GO TO 705                                                          JDA1
  702 S = (DW  -SDW  )/(TB34(3)-SMR)                                     JDA1
  705 WRITE(6,1006) DW  ,S                                               JDA1
      SQ(11,1) = S                                                       JDA1
      SD W = D W                                                         JDA1
      SMR = TB34(3)                                                      JDA1
      TB34(3) = TB34(3) - DW  /S                                         JDA1
      RPAR=SQ(19,3)                                                      JDA1
      IF(RPAR.GT.100.)SCB(214)=SCB(214)+ SE(8)*(TB34(3)-SMR) /RPAR       JDA1
      TO34(3)= TO34(3)*SMR / TB34(3)                                     JDA1
      IF(GUS.GT.6.) GO TO 703                                            JDA1
      GUS = GUS + 1.                                                     JDA1
      GO TO 101                                                          JDA1
  703 WRITE(6,1002)                                                      JDA1
  704 WRITE(6,1006) DW,SQ(11,1)                                          JDA1
  900 CONTINUE                                                           JDA1
      IF(SW(2).EQ.1.) ILAST=1                                            JDA1
      IF(ILAST.EQ.1) GO TO 101                                           JDA1
  950 CONTINUE                                                           JDA1
      CALL TAMPER(2)                                                     JDA1
      RETURN                                                             JDA1
 1000 FORMAT (15H0ORBITER  MU = F8.5,13H    WEIGHT = F9.0,13H    THRUST  JDA1
     1= F9.0,10H    T/W = F9.6/                                          JDA1
     2        15H BOOSTER  MU = F8.5,13H    WEIGHT = F9.0,13H    THRUST  JDA1
     3= F9.0,10H    T/W = F9.6)                                          JDA1
 1001 FORMAT(5X,11HPAYLOAD =  F10.2,5X,14HLO WT DIFF =  F12.2,5X,10HSLOP JDA1
     1E  =  F12.4///)                                                    JDA1
 1002 FORMAT(5X,36H***** ITERATION COUNT EXCEEDED *****/)                JDA1
 1003 FORMAT(5X,15HCONVERG ERR =  F10.6///)                              JDA1
 1004 FORMAT( 8X,5HDMU = F8.5, 5H  X = F8.4, 8H  DTWT = F9.6 / )         JDA11
 1005 FORMAT(5X,16HORB  WT DIFF =  F10.1,5X,9HSLOPE =  F10.1//)          JDA1
 1006 FORMAT(5X,25HORB PROPELLANT WT DIFF = F10.1,5X,8HSLOPE = F10.1//)  JDA1
      END                                                                JDA1
  ELT PROTHR,1,710302, 33704
  EOF "                                                                        "
      SUBROUTINE PROTHR                                                  PROTHR
C ***  PROTHR  ***                                                       PROTHR
C                                                                        PROTHR
C   PROTHR - PRINT  ALL OTHER QUANTITIES                                 PROTHR
C                                                                        PROTHR
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL KILO, KSBODY, KSWING, KWOVER, KSVERT, KSHORZ, KUWWIN,         WDH3
     1 KUWVER, KUWHOR, KUWBOD, KLROOT, KLBODY, KBBODY, KHBODY,           WDH3
     2 KSXPOS, KSPLAN                                                    WDH3
      REAL KCSPAN,KCROOT                                                 WDH21
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      UWWING = 0.                                                        PROTHR
      UWVERT=0.0                                                         WDH2
      UWHORZ=0.0                                                         WDH2
      IF(SBODY.NE.0.0) UWBODY=(WBASIC+WSECST+WINFUT+WINOXT)/SBODY        WDH2
      IF(SWING .NE. 0.)  UWWING = WWING / SWING                          PROTHR
      IF (SVERT.NE.0.) UWVERT = WVERT / SVERT                            PROTHR
      IF (SHORZ.NE.0.) UWHORZ = WHORZ / SHORZ                            PROTHR
      KILO = .0929                                                       PROTHR
      SFUTKK = KILO * SFUTK                                              PROTHR
      SOXTKK = KILO * SOXTK                                              PROTHR
      KSBODY = SBODY *KILO                                               PROTHR
      KSWING = SWING *KILO                                               PROTHR
      KSXPOS=KILO*SXPOS                                                  PROTHR
      KSPLAN =KILO*SPLAN                                                 PROTHR
      KSVERT = SVERT *KILO                                               PROTHR
      KSHORZ = SHORZ *KILO                                               PROTHR
      KILO=4.8824                                                        PROTHR
      KUWWIN = KILO* UWWING                                              PROTHR
      KUWVER = KILO* UWVERT                                              PROTHR
      KUWHOR = KILO* UWHORZ                                              PROTHR
      KUWBOD = KILO* UWBODY                                              PROTHR
      KWOVER = WOVERS*KILO                                               PROTHR
      KILO = .0929**.5                                                   PROTHR
      KBBODY = KILO*BBODY                                                PROTHR
      KLROOT=KILO*CROOT                                                  WDH2
      KLBODY = KILO*LBODY                                                PROTHR
      KCSPAN=CSPAN*KILO                                                  WDH2
      KCROOT=CROOT*KILO                                                  WDH2
      KHBODY = KILO*HBODY                                                PROTHR
      WRITE(6,40)                                                        PROTHR
   50 WRITE(6,100)                                                       PROTHR
  150 WRITE(6,200) SBODY     ,KSBODY                                     PROTHR
       WRITE(6,620) SFUTK,SFUTKK                                         WDH2
      WRITE(6,625) SOXTK,SOXTKK                                          WDH2
  650 WRITE(6,700)                                                       PROTHR
      WRITE(6,999) SWING,KSWING                                          WDH21
      WRITE(6,3000) SXPOS,KSXPOS                                         WDH2
      WRITE(6,9000)  SPLAN,KSPLAN                                        PROTHR
  950 WRITE(6,1000)SVERT     ,KSVERT                                     PROTHR
 1050 WRITE(6,1100)SHORZ     ,KSHORZ                                     PROTHR
 1250 WRITE(6,1300)                                                      PROTHR
 1350 WRITE(6,1400)UWWING,KUWWIN                                         PROTHR
 1450 WRITE(6,1500)UWVERT,KUWVER                                         PROTHR
 1550 WRITE(6,1600)UWHORZ,KUWHOR                                         PROTHR
 1650 IF(WINFUT.EQ.0..AND.WINOXT.EQ.0.)WRITE (6,1700) UWBODY, KUWBOD     PROTHR
  850 WRITE(6,910) WOVERS    ,KWOVER                                     PROTHR
3250  WRITE(6,2700)                                                      PROTHR
      WRITE(6,2500)                                                      PROTHR
      WRITE(6,2000) CSPAN,KCSPAN                                         WDH2
      WRITE(6,2100) CROOT,KCROOT                                         WDH2
      WRITE(6,3100) TOVERC                                               PROTHR
      WRITE(6,2600)                                                      PROTHR
 3270 WRITE(6,2200)LBODY,KLBODY                                          PROTHR
      WRITE(6,2300) BBODY,KBBODY                                         PROTHR
      WRITE(6,2400) HBODY,KHBODY                                         PROTHR
      RETURN                                                             PROTHR
   40 FORMAT (/// 15X11HDESIGN DATA  )                                   PROTHR
  100 FORMAT(1H0,12HWETTED AREAS   29X,10H  SQ. FT. ,10H    SQ.M.        PROTHR
     *)                                                                  PROTHR
200   FORMAT(1H0,40H    GROSS BODY (SBODY)                       2F10.2) PROTHR
  620 FORMAT (1H ,18HFUEL TANKS (SFUTK), 22X, 2F10.2)                    PROTHR
  625 FORMAT (1H ,22HOXIDIZER TANKS (SOXTK), 18X, 2F10.2)                PROTHR
  700 FORMAT(1H0,12HPLAN AREAS     29X,10H  SQ. FT. ,10H    SQ.M.      ) PROTHR
  999 FORMAT(1H ,40H    THEORETICAL WING AREA (SWING)            2F10.2) WDH21
  910 FORMAT(1H ,40H    WING LOADING                            ,2F10.2) WDH2
 1500 FORMAT(1H ,40H    VERTICAL SURFACES                    2F10.2    ) PROTHR
 1100 FORMAT(1H ,40H    HORIZONTAL SURFACES (SHORZ)          2F10.2    ) PROTHR
1300  FORMAT(1H0,12HUNIT WEIGHTS   28X,10H LB/SQ.FT.    ,10H  KG/SQ.M. ) PROTHR
 1400 FORMAT(1H0,40H    WING                                 2F10.2    ) PROTHR
 1000 FORMAT(1H ,40H    VERTICAL SURFACES (SVERT)            2F10.2    ) PROTHR
 1600 FORMAT(1H ,40H    HORIZONTAL SURFACES                  2F10.2    ) PROTHR
 1700 FORMAT(1H ,40H    BODY STRUCTURE (BASIC)               2F10.2    ) PROTHR
2000  FORMAT(1H ,40H    STRUCTURAL SPAN                          2F10.2) PROTHR
2100  FORMAT(1H ,40H    ROOT CHORD LENGTH                        2F10.2) PROTHR
 2200 FORMAT(1H ,40H    LENGTH (LBODY)                           2F10.2) PROTHR
 2300 FORMAT(1H ,40H    WIDTH  (BBODY)                           2F10.2) PROTHR
 2400 FORMAT(1H ,40H    HEIGHT  (HBODY)                          2F10.2) PROTHR
2500  FORMAT(1H ,40H  WING                                             ) PROTHR
2600  FORMAT(1H ,40H  BODY                                             ) PROTHR
2700  FORMAT(1H0,16HDIMENSIONAL DATA,27X,10H FEET     ,10H METERS      ) PROTHR
 3000 FORMAT(1H ,40H    EXPOSED WING AREA (SXPOS)                2F10.2) PROTHR
 3100 FORMAT(1H ,30H    THICKNESS RATIO                          2F10.2) PROTHR
9000  FORMAT(1H ,41H    PLANFORM, INCL. ELEVONS (SPLAN)                  PROTHR
     *  F9.2,F10.2)                                                      PROTHR
      END                                                                PROTHR
  ELT PRITVA,1,710302, 33706
  EOF "                                                                        "
      SUBROUTINE PRITVA                                                  PRITVA
C ***  PRITVA  ***                                                       PRITVA
C                                                                        PRITVA
C  PRITVA - PRINTS VARIABLES                                             PRITVA
C                                                                        PRITVA
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  PRITVA
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QMX     ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      WRITE (6,26001)                                                    PRITVA
      CALL DATE                                                          PRITVA
      WRITE (6,1000) CBBODY                                              PRITVA
      WRITE (6,2000) CHBODY                                              PRITVA
      WRITE (6,3000) CLBODY                                              PRITVA
      WRITE (6,4000) CSBODY                                              PRITVA
      WRITE (6,6000) CSFAIR                                              PRITVA
      WRITE( 6, 7000) CSFUTK                                             JDA9
      WRITE( 6, 8000) CSHORZ                                             JDA9
      WRITE( 6, 9000) CSOXTK                                             JDA9
      WRITE( 6,10000) CSPLAN                                             JDA9
      WRITE( 6,11000) CSVERT                                             JDA9
      WRITE (6,13000) CTHRST                                             PRITVA
      WRITE(6,13002) CTHST2                                              WDH2
      WRITE(6,16000) NCREW                                               WDH2
      WRITE(6,17000) NENGS                                               WDH2
      WRITE(6,20000) RHOFU                                               WDH2
      WRITE(6,21000) RHOFU2                                              WDH2
      WRITE(6,22000) RHOX                                                WDH2
      WRITE(6,22010) RHOX2                                               WDH2
      WRITE(6,24000) CTHRST,WWAIT(3),C(129),NENGS,TTOT                   PRITVA
      WRITE(6,25000) CTHST2,WWAIT(6),C(158),TTOT2                        WDH2
  100 WRITE (6,26001)                                                    PRITVA
      WRITE (6,26000)(I,WJET(I),I=1,6)                                   PRITVA
      IF(JUMP.EQ.0) GO TO 200                                            PRITVA
      WRITE (6,1500) SW(12)                                              PRITVA
      WRITE (6,1505) SW(14)                                              PRITVA
      WRITE (6,1510) SW(6)                                               PRITVA
      WRITE (6,1515) SW(11)                                              PRITVA
      WRITE (6,1520) SW(15)                                              PRITVA
      WRITE(6,1525) SQ(10,2)                                             PRITVA
       WRITE(6,30000) SE(9)                                              PRITVA
       WRITE(6,30001) SQ(5,1)                                            PRITVA
      WRITE(6,30002) SQ(6,1)                                             PRITVA
      WRITE(6,30003)  SQ(9,1)                                            PRITVA
      WRITE(6,30004) SQ(7,1)                                             PRITVA
      WRITE(6,30005) SQ(8,1)                                             PRITVA
      IF(JUMP.EQ.1) WRITE (6,999)                                        PRITVA
  200 RETURN                                                             WDH4
  999 FORMAT (1H1)                                                       PRITVA
 1000 FORMAT (1H0,41HCBBODY = WIDTH OF BODY / VBODY ** .3333 =,F9.4)     PRITVA
 1500 FORMAT (28H0SPECIFIC FUEL CONSUMPTION = F7.5)                      PRITVA
 1505 FORMAT (28H CRUISE BACK VELOCITY      = F9.2,8H FT/SEC )           PRITVA
 1510 FORMAT (28H THRUST RATIO              = F8.5)                      PRITVA
 1515 FORMAT (28H L/D                       = F8.5)                      PRITVA
 1520 FORMAT (28H FLYBACK RANGE             = F9.2,7H N. MI.)            PRITVA
 1525 FORMAT(29H BANK ANGLE DURING REENTRY = F6.2,4H DEG)                PRITVA
 2000 FORMAT (1H ,41HCHBODY = HEIGHT OF BODY / VBODY** .3333 =,F9.4)     PRITVA
 3000 FORMAT (1H ,41HCLBODY = LENGTH OF BODY / VBODY** .3333 =,F9.4)     PRITVA
 4000 FORMAT (1H ,47HCSBODY = WETTED AREA OF BODY / VBODY ** .6667 =,    PRITVA
     * F9.4)                                                             PRITVA
 6000 FORMAT (1H ,42HCSFAIR = FAIRING AREA / BODY WETTED AREA =,F9.4)    PRITVA
 7000 FORMAT (1H ,58HCSFUTK = WETTED AREA OF FUEL TANKS / TANK VOLUME ** PRITVA
     *.6667 =,F9.4)                                                      PRITVA
 8000 FORMAT(1H ,43HCSHORZ = STABILIZER AREA/THEO WING AREA=      ,F9.4) WDH21
 9000 FORMAT (1H ,63HCSOXTK = WETTED AREA OF OXIDIZER TANKS / TANK VOLUM PRITVA
     *E ** .6667 =,F9.4)                                                 PRITVA
10000 FORMAT (1H ,54HCSPLAN = VEHICLE PLANFORM AREA / BODY VOLUME **.666 PRITVA
     *7 =,F9.4)                                                          PRITVA
11000 FORMAT (1H ,57HCSVERT = AREA OF EACH VERTICAL SURFACE / VBODY ** . PRITVA
     *6667 =,F9.4)                                                       PRITVA
13000 FORMAT (1H ,30HCTHRST = ENGINE THRUST / WTO =,F9.4)                PRITVA
13002 FORMAT(47H1CTHST2 = AIRBREATHING ENGINE THRUST / WENTRY =,F9.4)    PRITVA
16000 FORMAT (1H0,24HNCREW = NUMBER OF CREW =,F5.0)                      PRITVA
17000 FORMAT (1H ,27HNENGS = NUMBER OF ENGINES =,F4.0)                   PRITVA
20000 FORMAT (1H ,22HRHOFU = FUEL DENSITY =,F6.2)                        PRITVA
21000 FORMAT (1H ,43HRHOFU2= SECONDARY PROPULSION FUEL DENSITY =,F6.2)   PRITVA
22000 FORMAT (1H ,25HRHOX = OXIDIZER DENSITY =,F6.2)                     PRITVA
22010 FORMAT (1H ,45HRHOX2 = SECONDARY PROPULSION OXIDIZER DENSITY,F6.2) PRITVA
24000 FORMAT (1H ,66HTTOT = MAIN PROPULSION THRUST = CTHRST * WORBIT + C PRITVA
     *(129) * NENGS =  / 10X                                             PRITVA
     *                F6.3,3H * ,F7.0, 3H + ,F8.0,3H * ,F2.0,3H = ,F7.0) PRITVA
25000 FORMAT (1H0,64HTTOT2 = AIRBREATHING ENGINE THRUST = CTHST2 X WETUR PRITVA
     *N  C(158) = *  / 10X F6.3,3H * ,F7.0,3H + ,F7.0,3H = ,F7.0)        PRITVA
26000 FORMAT (1H ,5HWJET(,I1,3H) =,F10.1)                                PRITVA
26001 FORMAT(1H0)                                                        PRITVA
30000 FORMAT(1H0,42HMAXIMUM ASCENT DYNAMIC PRESSURE         = F8.2,      PRITVA
     14H PSF)                                                            PRITVA
30001 FORMAT(1H ,42HTIME AT MAX Q                           = F8.3,      PRITVA
     14H SEC)                                                            PRITVA
30002 FORMAT(1H ,42HALTITUDE AT MAX Q                       = F8.0,      PRITVA
     13H FT)                                                             PRITVA
30003 FORMAT(1H ,42HMACH NUMBER AT MAX Q                    = F7.3)      PRITVA
30004 FORMAT(1H ,42HRELATIVE VELOCITY AT MAX Q              = F9.2,      PRITVA
     14H FPS)                                                            PRITVA
30005 FORMAT(1H ,42HRELATIVE FLIGHT PATH ANGLE AT MAX Q     = F6.2,      PRITVA
     14H DEG)                                                            PRITVA
       END                                                               PRITVA
  ELT PRITEQ,1,710302, 33707
  EOF "                                                                        "
      SUBROUTINE PRITEQ                                                  PRITEQ
C ***  PRITEQ  ***                                                       PRITEQ
C                                                                        PRITEQ
C                                                                        PRITEQ
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      COMMON NSEC,T,TR,TS(15),V(85),QX(73,15),W(50),Z(120),EC(3),CV(3),  LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
  900 WRITE(6,1150)                                                      PRITEQ
 1150 FORMAT(1H1,28HWEIGHT COEFFICIENTS = C(I), /)                       PRITEQ
      DO 300 I = 1,300                                                   PRITEQ
      IF(C(I).NE.0.) WRITE (6,1200) I,C(I)                               PRITEQ
  300 CONTINUE                                                           PRITEQ
 1200 FORMAT(I5,F13.5)                                                   PRITEQ
      WRITE(6,1250)                                                      PRITEQ
 1250 FORMAT(1H0,38HVOLUME COEFFICIENTS = K(I), I = 1,30 =/)             PRITEQ
      WRITE(6,1300)(I,K(I),I=1,30)                                       PRITEQ
 1300 FORMAT( 5(I5,F13.5))                                               PRITEQ
      CALL PRITVA                                                        PRITEQ
      RETURN                                                             PRITEQ
       END                                                               PRITEQ
  ELT PRWTSM,1,710302, 33710
  EOF "                                                                        "
      SUBROUTINE PRWTSM                                                  PRWTSM
C ***  PRWTSM  ***                                                       PRWTSM
C                                                                        PRWTSM
C   PRWTSM - PRINT  WEIGHT SUMMARY                                       PRWTSM
C                                                                        PRWTSM
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL KWABFU                                                        PRWTSM
      REAL          KDELTV                                               PRWTSM
      REAL KWJET(6),KWFUEL(6),KWOX(6)                                    PRWTSM
     *       ,KWPRIG,KWGROS                                              PRWTSM
      REAL KILO,KWWAIT                                                   PRWTSM
      DIMENSION KDELTV(6)                                                PRWTSM
      DIMENSION DELTAV(6)                                                PRWTSM
      DIMENSION OF(6)                                                    PRWTSM
      DIMENSION KWWAIT(10)                                               PRWTSM
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  PRWTSM
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QMX     ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      COMMON/EMS/WORBIT,WETURN,WENTRY,WLAND                              PRWTSM
      WORBIT = 0.                                                        PRWTSM
      WLAND = 0.                                                         PRWTSM
      WENTRY = 0.                                                        PRWTSM
      WETURN = 0.                                                        PRWTSM
      KILO = 0.4535924                                                   PRWTSM
      KI= 6                                                              PRWTSM
      IF(WPREIG.NE.0.) WPREIG=-WPREIG                                    PRWTSM
    5 DO 111 I = 1, KI                                                   PRWTSM
      IF(CFUEL(I).EQ.0.0) CFUEL(I)=1.                                    WDH1
      OF(I) = (1-CFUEL(I)) / CFUEL(I)                                    PRWTSM
      IF(WJET(I).NE.0.) WJET(I)=-WJET(I)                                 PRWTSM
      IF(WFUEL(I).NE.0.)WFUEL(I)=-WFUEL(I)                               PRWTSM
      IF(WOX(I).NE.0.)WOX(I)=-WOX(I)                                     PRWTSM
      KWJET(I)=WJET(I)*KILO                                              PRWTSM
      KWFUEL(I)=KILO*WFUEL(I)                                            PRWTSM
      KWOX(I)=KILO*WOX(I)                                                PRWTSM
      DELTAV(I)=32.174*ISP(I)*ALOG(MR(I))                                PRWTSM
      KDELTV(I)=DELTAV(I)/3.281                                          PRWTSM
  111 CONTINUE                                                           PRWTSM
      KWPRIG=KILO*WPREIG                                                 PRWTSM
      KWGROS=KILO*WGROSS                                                 PRWTSM
      DO 10 I=1,10                                                       PRWTSM
10    KWWAIT(I) = KILO* WWAIT(I)                                         PRWTSM
      DO 20 J = 1,6                                                      PRWTSM
      IF(MR(J) .NE. 1.) GO TO 25                                         PRWTSM
   20 CONTINUE                                                           PRWTSM
      GO TO 50                                                           PRWTSM
   25 CONTINUE                                                           PRWTSM
      WRITE (6,664)                                                      PRWTSM
      CALL DATE                                                          PRWTSM
      WRITE(6,665)                                                       PRWTSM
      WRITE (6,666)(I,MR(I),OF(I),ISP(I),DELTAV(I),KDELTV(I), I=1,6)     PRWTSM
   50 WRITE(6,100)                                                       PRWTSM
      WRITE(6,240)                                                       PRWTSM
  150 WRITE(6,200) WGROSS,KWGROS                                         PRWTSM
      WRITE(6,205)WPREIG,KWPRIG                                          PRWTSM
      WRITE(6,207) WWAIT(1),KWWAIT(1)                                    WDH2
160   WRITE(6,210) WFUEL(1),KWFUEL(1)                                    PRWTSM
      WRITE(6,220) WOX  (1),KWOX  (1)                                    PRWTSM
      WRITE(6,230) WJET(1),KWJET(1)                                      WDH2
      WRITE(6,300) WWAIT(2),KWWAIT(2)                                    WDH21
      WENTRY = WWAIT(6)                                                  PRWTSM
      JUMP = JUMP + 1                                                    PRWTSM
      GO TO (260,280), JUMP                                              PRWTSM
  260 WRITE (6,210) WFUEL(3), KWFUEL(3)                                  PRWTSM
      WRITE (6,220) WOX(3), KWOX(3)                                      PRWTSM
      WRITE(6,230) WJET(3),KWJET(3)                                      WDH2
      WRITE (6,401) WWAIT(4), KWWAIT(4)                                  PRWTSM
      WORBIT = WWAIT(4)                                                  PRWTSM
      WRITE(6,230) WJET(4),KWJET(4)                                      WDH2
      WRITE (6,500) WWAIT(5), KWWAIT(5)                                  PRWTSM
      WETURN = WWAIT(5)                                                  PRWTSM
      WRITE (6,210) WFUEL(5), KWFUEL(5)                                  PRWTSM
      WRITE (6,220) WOX(5), KWOX(5)                                      PRWTSM
      WRITE(6,230) WJET(5),KWJET(5)                                      WDH2
      WRITE (6,567) WWAIT(6), KWWAIT(6)                                  PRWTSM
      JUMP = JUMP - 1                                                    PRWTSM
      IF(JUMP.EQ.0  ) GO TO 765                                          WDH21
  280 WRITE (6,210) WFUEL(3), KWFUEL(3)                                  PRWTSM
      WRITE (6,220) WOX(3), KWOX(3)                                      PRWTSM
      WRITE(6,237) WJET(3),KWJET(3)                                      WDH2
      WRITE (6,1000) WWAIT(4), KWWAIT(4)                                 PRWTSM
      WETURN = WWAIT(4)                                                  PRWTSM
      WRITE (6,1005) WJET(4), KWJET(4)                                   PRWTSM
      WRITE (6,500) WWAIT(5) , KWWAIT(5)                                 PRWTSM
      WRITE(6,1010) WJET(5),KWJET(5)                                     WDH2
      WRITE (6,1015)WWAIT(6), KWWAIT(6)                                  PRWTSM
      JUMP=JUMP-1                                                        WDH21
  765 KWABFU = WABFU * KILO                                              PRWTSM
      WABFU = - WABFU                                                    PRWTSM
      KWABFU = - KWABFU                                                  PRWTSM
      WRITE (6,225) WABFU, KWABFU                                        PRWTSM
      WAIT  = WWAIT(7)                                                   JDA9
      WLAND =WAIT                                                        PRWTSM
      WABFU = - WABFU                                                    PRWTSM
      WAIT2 =KWWAIT(7)                                                   JDA9
      WRITE (6,800) WAIT, WAIT2                                          PRWTSM
      IF(WPREIG.NE.0.) WPREIG=-WPREIG                                    PRWTSM
      DO 120 I=1,KI                                                      PRWTSM
      IF(WJET(I).NE.0.) WJET(I)=-WJET(I)                                 PRWTSM
      IF(WFUEL(I).NE.0.)WFUEL(I)=-WFUEL(I)                               PRWTSM
      IF(WOX(I).NE.0.)WOX(I)=-WOX(I)                                     PRWTSM
  120 CONTINUE                                                           PRWTSM
      IF(WJET(6).EQ.WLOSS) WJET(6) =0.                                   PRWTSM
      CALL PRITEQ                                                        WDH1
      RETURN                                                             PRWTSM
  100 FORMAT(// 15H WEIGHT SUMMARY  ,28X,10H  POUNDS  ,10HKILOGRAMS    ) PRWTSM
  200 FORMAT(1H0,40HMAXIMUM GROSS WEIGHT (WGROSS)             2F10.0)    PRWTSM
205   FORMAT(1H0,40H   PRE-IGNITION LOSSES                       2F10.0) PRWTSM
207   FORMAT(1H0,40HMASS AT IGNITION                             2F10.0) PRWTSM
  210 FORMAT(1H0,40H   FUEL                                      2F10.0) PRWTSM
  220 FORMAT(1H ,40H   OXIDIZER                                  2F10.0) PRWTSM
  225 FORMAT (1H0,40H   FLYBACK FUEL                             2F10.0) PRWTSM
  230 FORMAT(1H ,40H   JETTISON                                  2F10.0) PRWTSM
  237 FORMAT (1H ,40H   PAYLOAD ADDED/REMOVED                  2F10.0)   PRWTSM
  240 FORMAT(1H0,2H  )                                                   PRWTSM
  300 FORMAT(1H0,40HEND OF PRE-FLIGHT PHASE (WTO)                2F10.0) PRWTSM
  401 FORMAT (1H0,40HWEIGHT IN ORBIT (WORBIT)                  2F10.0)   PRWTSM
  500 FORMAT(1H0,40HRETURN CONDITION (WETURN)                 2F10.0)    PRWTSM
  567 FORMAT(1H0,40HENTRY WEIGHT (WENTRY)                       2F10.0)  PRWTSM
  664 FORMAT (1H1)                                                       PRWTSM
  665 FORMAT(69X,31HTHEORETICAL VELOCITY INCREMENT   / 51X               PRWTSM
     * 14HO/F RATIO  ISP,5X,28H FEET/SECOND   METERS/SECOND            ) PRWTSM
  666 FORMAT(1H0,31HMASS RATIO DURING FLIGHT PHASE  ,I2,1H=,F10.4,       PRWTSM
     *   F12.4,3XF6.1,2XF10.1,5XF10.1)                                   PRWTSM
  800 FORMAT(1H0,40HLANDING WEIGHT (WLAND)                   2F10.0  )   PRWTSM
 1000 FORMAT (1H0,40HINITIAL SEPARATION                      2F10.0)     PRWTSM
 1005 FORMAT (1H ,40H   THRUST DECAY AND RESIDUALS           2F10.0)     PRWTSM
 1010 FORMAT (1H ,40H   JETTISON AND EXPENDABLES             2F10.0)     PRWTSM
 1015 FORMAT (1H0,40HINITIAL FLYBACK                         2F10.0)     PRWTSM
      END                                                                PRWTSM
  ELT PRINTV,1,710302, 33712
  EOF "                                                                        "
      SUBROUTINE PRINTV                                                  PRINTV
C ***  PRINTV  ***                                                       PRINTV
C                                                                        PRINTV
C   PRINTV - PRINT  VOLUMES                                              PRINTV
C                                                                        PRINTV
      REAL NENGS
      REAL KILO,KVSTRU,KVCARG,KVLGBA,KVPROP,KVFUTK,KVOXTK,KVINST,KVOTHE  WDH4
     1,KVBODY,KVFUT2,KVOXT2,KVCREW,ISP,K,LF,MR,NCREW,LBODY,NPASS         WDH4
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
    9 KILO = .0283                                                       PRINTV
      KVSTRU =KILO *VSTRUC                                               PRINTV
      KVCREW=KILO *VCREW                                                 JDA9
      KVOXT2=KILO*VOXTK2                                                 PRINTV
      KVFUT2=KILO*VFUTK2                                                 PRINTV
      KVCARG =KILO *VCARGO                                               PRINTV
      KVLGBA =KILO *VLGBAY                                               PRINTV
      KVPROP =KILO *VPROP                                                PRINTV
      KVFUTK =KILO *VFUTK                                                PRINTV
      KVOXTK =KILO *VOXTK                                                PRINTV
      KVINST = VINSTK*KILO                                               PRINTV
      KVOTHE =KILO *VOTHER                                               PRINTV
      KVBODY =KILO *VBODY                                                PRINTV
      WRITE (6,8)                                                        PRINTV
      CALL DATE                                                          PRINTV
      WRITE(6,10)                                                        PRINTV
      WRITE(6,100) VSTRUC,KVSTRU                                         WDH2
      WRITE(6,200) VCREW,KVCREW                                          JDA9
      WRITE (6,300) VCARGO,KVCARG                                        PRINTV
      WRITE(6,400) VLGBAY,KVLGBA                                         WDH2
      WRITE(6,500) VPROP,KVPROP                                          WDH2
      WRITE(6,700) VFUTK,KVFUTK                                          WDH2
      WRITE(6,800) VOXTK,KVOXTK                                          WDH2
      WRITE(6,900) VINSTK,KVINST                                         WDH2
      WRITE(6,1400) VFUTK2,KVFUT2                                        WDH2
      WRITE(6,1500) VOXTK2,KVOXT2                                        WDH2
 1110 FORMAT(1H0,40HTOTAL ENTRY VEHICLE VOLUME               F9.1,F10.1) PRINTV
  950 WRITE (6,1000)VOTHER,KVOTHE                                        PRINTV
      WRITE(6,1110) VBODY,KVBODY                                         WDH1
      IF(VBODY.EQ.0.) VBODY = 1.                                         PRINTV
      CALL PROTHR                                                        WDH1
      RETURN                                                             PRINTV
    8 FORMAT (1H1)                                                       PRINTV
   10 FORMAT(   8H VOLUMES  ,35X,10H  CU FT     ,10H  CU M         /   ) PRINTV
  100 FORMAT(1H0,40HBODY STRUCTURE                           2F10.2)     PRINTV
  200 FORMAT(1H ,40HCREW AND PASSENGER COMPARTMENTS          2F10.2)     PRINTV
  300 FORMAT(1H ,40HCARGO COMPARTMENT                        2F10.2)     PRINTV
  400 FORMAT(1H ,40HLANDING GEAR BAYS                        2F10.2)     PRINTV
  500 FORMAT(1H ,40HPROPULSION BAY WITHIN BODY               2F10.2)     PRINTV
700   FORMAT(1H ,40HFUEL CONTAINERS                              2F10.2) PRINTV
800   FORMAT(1H ,40HOXIDIZER CONTAINERS                          2F10.2) PRINTV
900   FORMAT(1H ,40HPROPELLANT INSULATION                        2F10.2) PRINTV
 1000 FORMAT(1H ,40HOTHER BODY VOLUME                        2F10.2)     PRINTV
 1400 FORMAT(1H ,40HSECONDARY FUEL CONTAINERS                    2F10.2) PRINTV
 1500 FORMAT(1H ,40HSECONDARY OXIDIZER CONTAINERS                2F10.2) PRINTV
      END                                                                PRINTV
  ELT MSC1,1,710302, 33609
  EOF "                                                                        "
  BLK  DATAX
  SEG  MAIN-DATAX-*(SYNTH,GTSM,WTVOL)
  ELT STORE,1,710302, 33716
  EOF "                                                                        "
      SUBROUTINE STORE                                                   STORE
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL NENGS
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        STORE
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                STORE
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        STORE
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                STORE
      DIMENSION OWSAVE(10),BWSAVE(10)                                    WDH21
C                                                                        STORE
C     SYNTHESIS CONTROL SUBROUTINE FOR TWO-STAGE VEHICLES                STORE
C                                                                        STORE
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      COMMON/ORBINX/                                                     STORE
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     STORE
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, STORE
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, STORE
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, STORE
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       STORE
      COMMON/ORBINY/                                                     STORE
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     STORE
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, STORE
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, STORE
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, STORE
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       STORE
      COMMON/ORBO/TO58,TO59,TB58,TB59                                    STORE
      COMMON/MF/TO14A,TB14A                                              STORE
      SWING=CSWING                                                       WDH1
      IF(CSHORZ.GT.20.) CSHORZ=CSHORZ/SWING                              WDH1
      VBODYR = 1./(VBODY**.666667)                                       STORE
      IF(CSBODY.GT.20.) CSBODY=CSBODY*VBODYR                             STORE
      IF(CSPLAN.GT.20.) CSPLAN=CSPLAN*VBODYR                             STORE
      IF(CSVERT.GT.5.) CSVERT=CSVERT*VBODYR                              STORE
      IF(CSFAIR.GT.20.) CSFAIR=CSFAIR/(CSBODY/VBODYR)
      VBODYR = SQRT(VBODYR)                                              STORE
      IF(CBBODY.GT.5.) CBBODY = CBBODY*VBODYR                            STORE
      IF(CHBODY.GT.5.) CHBODY = CHBODY*VBODYR                            STORE
      IF(CLBODY.GT.20.) CLBODY=CLBODY *VBODYR                            STORE
      RETURN                                                             STORE
      ENTRY ORBSTO                                                       STORE
      TO2 = CBBODY                                                       STORE
      DO 20 I = 1,6                                                      STORE
   20 TO4(I) = CFUEL(I)                                                  STORE
      TO5 = CHBODY                                                       STORE
      TO6 = CLBODY                                                       STORE
      TO7 = CSBODY                                                       STORE
      TO10 = CSFAIR                                                      STORE
      TO11 = CSFUTK                                                      STORE
      TO12 = CSOXTK                                                      STORE
      TO13 = CSHORZ                                                      STORE
      TO15 = CSPLAN                                                      STORE
      TO16 = CSVERT                                                      STORE
      TO17 = CSWING                                                      STORE
      TO18 = CTHRST                                                      STORE
      TO19 = CTHST2                                                      STORE
      DO 24 I = 1,6                                                      STORE
   24 TO27(I) = ISP(I)                                                   STORE
      DO 26 I = 1,6                                                      STORE
   26 TO34(I) = MR(I)                                                    STORE
      TO35 = NCREW                                                       STORE
      TO36 = NENGS                                                       STORE
      TO38 = NPASS                                                       STORE
      TO41 = RHOFU                                                       STORE
      TO42 = RHOFU2                                                      STORE
      TO43 = RHOX                                                        STORE
      TO44 = RHOX2                                                       STORE
      TO45 = SWING                                                       STORE
      TO47 = TOVERC                                                      STORE
      TO51 = VBODY                                                       STORE
      TO52 = VFUTK                                                       STORE
      TO53 = VFUTK2                                                      STORE
      TO54 = VOXTK                                                       STORE
      TO55 = VOXTK2                                                      STORE
      TO56 = WGROSS                                                      STORE
      DO 30 I = 1,30                                                     STORE
   30 SKO(I)= K(I)                                                       STORE
      DO 50 I = 1,300                                                    STORE
   50 SCO(I)= C(I)                                                       STORE
      TO59 = LF                                                          STORE
      TO60=TPRATO                                                        WDH1
      TO61=ASRATO                                                        WDH1
      TO62=FXWOVS                                                        WDH1
      TO63=NWL                                                           WDH1
      TO64=ITPS                                                          WDH1
      TO65=PCHAM                                                         WDH1
      TO66=ANENGS                                                        WDH1
      TO67=ANTANK                                                        WDH1
      TO68=TYTAIL                                                        WDH1
      TO69=NLISTO                                                        WDH1
      TO70=ASWEEP                                                        WDH1
      TO71=WFROST                                                        WDH21
      TO72=WFUTRP                                                        WDH21
      TO73=WOXTRP                                                        WDH21
      TO74=WSRTRP                                                        WDH21
      TO75=WDECAY                                                        WDH21
      TO76=WFURES                                                        WDH21
      TO77=WOXRES                                                        WDH21
      TO78=WACSFO                                                        WDH21
      TO79=WFULOS                                                        WDH21
      TO80=WOXLOS                                                        WDH21
      TO81=WPOWFO                                                        WDH21
      TO82=WGASPR                                                        WDH21
      TO83=WACRES                                                        WDH21
      TO84=WPOWRS                                                        WDH21
      DO 999 I=1,10                                                      WDH21
  999 OWSAVE(I)=WWAIT(I)                                                 WDH21
      RETURN                                                             STORE
      ENTRY BOOSTO                                                       STORE
      TB2 = CBBODY                                                       STORE
      DO 60 I = 1,6                                                      STORE
   60 TB4(I) = CFUEL(I)                                                  STORE
      TB5 = CHBODY                                                       STORE
      TB6 = CLBODY                                                       STORE
      TB7 = CSBODY                                                       STORE
      TB10 = CSFAIR                                                      STORE
      TB11 = CSFUTK                                                      STORE
      TB12 = CSOXTK                                                      STORE
      TB13 = CSHORZ                                                      STORE
      TB15 = CSPLAN                                                      STORE
      TB16 = CSVERT                                                      STORE
      TB17 = CSWING                                                      STORE
      TB18 = CTHRST                                                      STORE
      TB19 = CTHST2                                                      STORE
      DO 64 I = 1,6                                                      STORE
   64 TB27(I) = ISP(I)                                                   STORE
      DO 66 I = 1,6                                                      STORE
   66 TB34(I) = MR(I)                                                    STORE
      TB35 = NCREW                                                       STORE
      TB36 = NENGS                                                       STORE
      TB38 = NPASS                                                       STORE
      TB41 = RHOFU                                                       STORE
      TB42 = RHOFU2                                                      STORE
      TB43 = RHOX                                                        STORE
      TB44 = RHOX2                                                       STORE
      TB45 = SWING                                                       STORE
      TB47 = TOVERC                                                      STORE
      TB51 = VBODY                                                       STORE
      TB52 = VFUTK                                                       STORE
      TB53 = VFUTK2                                                      STORE
      TB54 = VOXTK                                                       STORE
      TB55 = VOXTK2                                                      STORE
      TB56 = WGROSS                                                      STORE
      DO 80 I = 1, 30                                                    STORE
   80 SKB(I) = K(I)                                                      STORE
      DO 100 I = 1, 300                                                  STORE
  100 SCB(I) = C(I)                                                      STORE
      TB59 = LF                                                          STORE
      TB60=TPRATO                                                        WDH1
      TB61=ASRATO                                                        WDH1
      TB62=FXWOVS                                                        WDH1
      TB63=NWL                                                           WDH1
      TB64=ITPS                                                          WDH1
      TB65=PCHAM                                                         WDH1
      TB66=ANENGS                                                        WDH1
      TB67=ANTANK                                                        WDH1
      TB68=TYTAIL                                                        WDH1
      TB69=NLISTO                                                        WDH1
      TB70=ASWEEP                                                        WDH1
      TB71=WFROST                                                        WDH21
      TB72=WFUTRP                                                        WDH21
      TB73=WOXTRP                                                        WDH21
      TB74=WSRTRP                                                        WDH21
      TB75=WDECAY                                                        WDH21
      TB76=WFURES                                                        WDH21
      TB77=WOXRES                                                        WDH21
      TB78=WACSFO                                                        WDH21
      TB79=WFULOS                                                        WDH21
      TB80=WOXLOS                                                        WDH21
      TB81=WPOWFO                                                        WDH21
      TB82=WGASPR                                                        WDH21
      TB83=WACRES                                                        WDH21
      TB84=WPOWRS                                                        WDH21
      DO 997 I=1,10                                                      WDH21
  997 BWSAVE(I)=WWAIT(I)                                                 WDH21
      RETURN                                                             STORE
      ENTRY ORBCAL                                                       STORE
      CBBODY   = TO2                                                     STORE
      DO 200I = 1,6                                                      STORE
  200 CFUEL(I) = TO4(I)                                                  STORE
      CHBODY   = TO5                                                     STORE
      CLBODY   = TO6                                                     STORE
      CSBODY   = TO7                                                     STORE
      CSFAIR   = TO10                                                    STORE
      CSFUTK   = TO11                                                    STORE
      CSOXTK   = TO12                                                    STORE
      CSHORZ   = TO13                                                    STORE
      CSPLAN   = TO15                                                    STORE
      CSVERT   = TO16                                                    STORE
      CSWING   = TO17                                                    STORE
      CTHRST   = TO18                                                    STORE
      CTHST2   = TO19                                                    STORE
      DO 204I = 1,6                                                      STORE
  204 ISP(I)   = TO27(I)                                                 STORE
      DO 206I = 1,6                                                      STORE
  206 MR(I)    = TO34(I)                                                 STORE
      NCREW    = TO35                                                    STORE
      NENGS    = TO36                                                    STORE
      NPASS    = TO38                                                    STORE
      RHOFU    = TO41                                                    STORE
      RHOFU2   = TO42                                                    STORE
      RHOX     = TO43                                                    STORE
      RHOX2    = TO44                                                    STORE
      SWING    = TO45                                                    STORE
      TOVERC   = TO47                                                    STORE
      VBODY    = TO51                                                    STORE
      VFUTK    = 0.                                                      STORE
      VFUTK2   = TO53                                                    STORE
      VOXTK    = 0.                                                      STORE
      VOXTK2   = TO55                                                    STORE
      WGROSS   = TO56                                                    STORE
      DO 230 I = 1,30                                                    STORE
  230 K(I) = SKO(I)                                                      STORE
      DO 260 I = 1,300                                                   STORE
  260 C(I) = SCO(I)                                                      STORE
      LF = TO59                                                          STORE
      TPRATO=TO60                                                        WDH1
      ASRATO=TO61                                                        WDH1
      FXWOVS=TO62                                                        WDH1
      NWL=TO63                                                           WDH1
      ITPS=TO64                                                          WDH1
      PCHAM=TO65                                                         WDH1
      ANENGS=TO66                                                        WDH1
      ANTANK =TO67                                                       WDH1
      TYTAIL=TO68                                                        WDH1
      NLISTO=TO69                                                        WDH1
      ASWEEP=TO70                                                        WDH1
      WFROST=TO71                                                        WDH21
      WFUTRP=TO72                                                        WDH21
      WOXTRP=TO73                                                        WDH21
      WSRTRP=TO74                                                        WDH21
      WDECAY=TO75                                                        WDH21
      WFURES=TO76                                                        WDH21
      WOXRES=TO77                                                        WDH21
      WACSFO=TO78                                                        WDH21
      WFULOS=TO79                                                        WDH21
      WOXLOS=TO80                                                        WDH21
      WPOWFO=TO81                                                        WDH21
      WGASPR=TO82                                                        WDH21
      WACRES=TO83                                                        WDH21
      WPOWRS=TO84                                                        WDH21
      DO 996 I=1,10                                                      WDH21
  996 WWAIT(I)=OWSAVE(I)                                                 WDH21
      RETURN                                                             STORE
      ENTRY BOOCAL                                                       STORE
      CBBODY   = TB2                                                     STORE
      DO 300I = 1,6                                                      STORE
  300 CFUEL(I) = TB4(I)                                                  STORE
      CHBODY   = TB5                                                     STORE
      CLBODY   = TB6                                                     STORE
      CSBODY   = TB7                                                     STORE
      CSFAIR   = TB10                                                    STORE
      CSFUTK   = TB11                                                    STORE
      CSOXTK   = TB12                                                    STORE
      CSHORZ   = TB13                                                    STORE
      CSPLAN   = TB15                                                    STORE
      CSVERT   = TB16                                                    STORE
      CSWING   = TB17                                                    STORE
      CTHRST   = TB18                                                    STORE
      CTHST2   = TB19                                                    STORE
      DO 304I = 1,6                                                      STORE
  304 ISP(I)   = TB27(I)                                                 STORE
      DO 306I = 1,6                                                      STORE
  306 MR(I)    = TB34(I)                                                 STORE
      NCREW    = TB35                                                    STORE
      NENGS    = TB36                                                    STORE
      NPASS    = TB38                                                    STORE
      RHOFU    = TB41                                                    STORE
      RHOFU2   = TB42                                                    STORE
      RHOX     = TB43                                                    STORE
      RHOX2    = TB44                                                    STORE
      SWING    = TB45                                                    STORE
      TOVERC   = TB47                                                    STORE
      VBODY    = TB51                                                    STORE
      VFUTK    = 0.                                                      STORE
      VFUTK2   = TB53                                                    STORE
      VOXTK    = 0.                                                      STORE
      VOXTK2   = TB55                                                    STORE
      DO 400 I = 1,30                                                    STORE
  400 K(I) = SKB(I)                                                      STORE
      DO 450 I = 1,300                                                   STORE
  450 C(I) = SCB(I)                                                      STORE
      LF = TB59                                                          STORE
      TPRATO=TB60                                                        WDH1
      ASRATO=TB61                                                        WDH1
      FXWOVS=TB62                                                        WDH1
      NWL=TB63                                                           WDH1
      ITPS=TB64                                                          WDH1
      PCHAM=TB65                                                         WDH1
      ANENGS=TB66                                                        WDH1
      ANTANK =TB67                                                       WDH1
      TYTAIL=TB68                                                        WDH1
      NLISTO=TB69                                                        WDH1
      ASWEEP=TB70                                                        WDH1
      WFROST=TB71                                                        WDH21
      WFUTRP=TB72                                                        WDH21
      WOXTRP=TB73                                                        WDH21
      WSRTRP=TB74                                                        WDH21
      WDECAY=TB75                                                        WDH21
      WFURES=TB76                                                        WDH21
      WOXRES=TB77                                                        WDH21
      WACSFO=TB78                                                        WDH21
      WFULOS=TB79                                                        WDH21
      WOXLOS=TB80                                                        WDH21
      WPOWFO=TB81                                                        WDH21
      WGASPR=TB82                                                        WDH21
      WACRES=TB83                                                        WDH21
      WPOWRS=TB84                                                        WDH21
      DO 995 I=1,10                                                      WDH21
  995 WWAIT(I)=BWSAVE(I)                                                 WDH21
      IF(TB18.EQ.0..AND.SCB(129).EQ.0.) C(129) = TTOT * NENGS            STORE
      IF(SCB(153).EQ.0.) C(154) = WAUXT * SCB(263)                       STORE
      C(105)=WGROSS                                                      WDH2
      WGROSS   = TB56                                                    STORE
      WJET(3)=C(105)+C(78)                                               WDH1
      RETURN                                                             STORE
      END                                                                STORE
  ELT TAMPER,1,710302, 33720
  EOF "                                                                        "
      SUBROUTINE TAMPER (NCALL)                                          TAMPER
      REAL NENGS
      REAL KIN                                                           TAMPER
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL LBODYO,LBODYB                                                 TAMPER
      DIMENSION SKO(30),SCO(300),TO4(6),TO20(10),TO27(6),TO34(6),        TAMPER
     1 TO48(10),TO49(10),TO50(10),TO57(6)                                TAMPER
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  TAMPER
      COMMON/TAMP/WGROSO,OTTOT,WFUOXO,TBTO,BTTOT                         TAMPER
      COMMON/ORBINX/                                                     TAMPER
     1 TO1,TO2,TO3,TO4,TO5,TO6,TO7,TO8,TO9,TO10,TO11,TO12,TO13,TO14,     TAMPER
     2 TO15,TO16,TO17,TO18,TO19,TO20,TO21,IO22,IO23,IO24,IO25,IO26,TO27, TAMPER
     3 IO28,IO29,IO30,IO31,IO32,TO33,TO34,TO35,TO36,IO37,TO38,TO39,TO40, TAMPER
     4 TO41,TO42,TO43,TO44,TO45,TO46,TO47,TO48,TO49,TO50,TO51,TO52,TO53, TAMPER
     5 TO54,TO55,TO56,TO57,SKO,SCO                                       TAMPER
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        TAMPER
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                TAMPER
      COMMON/ORBINY/                                                     TAMPER
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     TAMPER
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, TAMPER
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, TAMPER
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, TAMPER
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       TAMPER
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QMX     ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      COMMON/SUMVW/WOP,         WABFUB,WFUOXB,WDRYB,WGROSB,WOTHB,        TAMPER
     1 VFUTKB,VOXTKB,VOTHB,VBODYB,VABFUB,                                TAMPER
     2 LBODYB,SBODYB,SPLANB,WOVRSB,                                      TAMPER
     1              WPAYLO,WDRYO,WOTHO,  WABFUO,                         TAMPER
     2 VFUTKO,VOXTKO,VCARO,VOTHO,VBODYO,                                 TAMPER
     3 LBODYO,SBODYO,SPLANO,WOVRSO                                       TAMPER
     4 ,WORBTO,WORBTB,WRTRNO,WRTRNB,WENTRO,WENTRB,WLANDB,WLANDO          TAMPER
     5 , WCONTO,WCONTB                                                   TAMPER
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/EMS/WORBIT,WETURN,WENTRY,WLAND                              TAMPER
      COMMON/OS/OSPLAN                                                   TAMPER
C                                                                        TAMPER
      IFIRE = SE(5)                                                      TAMPER
      V(7)=   WGROSS                                                     TAMPER
C        AERO.  REFERENCE  AREAS                                         EMS5
      DO 2 I=1,3                                                         EMS5
      Q(5,I) = TB45                                                      EMS5
    2 Q(6,I) = TB45                                                      EMS5
      DO 3 I = 4,7                                                       EMS5
      Q(5,I) = TO45                                                      EMS5
    3 Q(6,I) = TO45                                                      EMS5
      DO 4 I=8,15
      Q(5,I) = TB45                                                      EMS5
    4 Q(6,I) = TB45                                                      EMS5
C                                                                        EMS5
      Q(26,3) = -WPAYL                                                   TAMPER
      Q(23,2)= V(7)-   WFUOX                                             TAMPER
C     THRUST                                                             TAMPER
      Q(1,5)= OTTOT * SE(23)                                             TAMPER
      Q(1,6)= OTTOT * SE(24)                                             TAMPER
      Q(1,7)= OTTOT *SE(25)                                              TAMPER
C     ISP                                                                TAMPER
      Q(2,5)=SE(15)                                                      TAMPER
      Q(2,6)=SE(17)                                                      TAMPER
      Q(2,7)=SE(19)                                                      TAMPER
      BWDOT1 =  BTTOT*SE(26)/SE(1)                                       TAMPER
      BWDOT2 =  BTTOT * SE(27) / SE(11)                                  TAMPER
      SE(40) = 0.                                                        EMS3
      GO TO (5,9),IFIRE                                                  TAMPER
C     SIMULTANEOUS FIRING OF BOOSTER AND ORBITER                         TAMPER
C     THRUST AND ISP                                                     TAMPER
    5 Q(1,1) = OTTOT*SE(21) +  BTTOT*SE(26)                              TAMPER
      Q(1,2) = OTTOT*SE(22) +  BTTOT*SE(27)                              TAMPER
      OWDOT1 = OTTOT*SE(21)/SE(2)                                        TAMPER
      WDOTT1 = OWDOT1 + BWDOT1                                           TAMPER
      OWDOT2 = OTTOT*SE(22)/SE(12)                                       TAMPER
      WDOTT2 = OWDOT2 + BWDOT2                                           TAMPER
      Q(2,1)=Q(1,1)/WDOTT1                                               TAMPER
      Q(2,2)=Q(1,2)/WDOTT2                                               TAMPER
      Q(3,1) =(OWDOT1 * SE(4) + BWDOT1 * SE(3) ) / WDOTT1                TAMPER
      Q(3,2) =(OWDOT2 *SE(14) + BWDOT2 * SE(13) ) / WDOTT2               TAMPER
      IF(SE(39) .EQ. 0.) GO TO 16                                        TAMPER
      T2 = (   WFUOX - BWDOT1*Q(23,1))/BWDOT2                            TAMPER
      SE(40) = OWDOT1*Q(23,1)+OWDOT2*T2                                  TAMPER
      Q(26,3) = Q(26,3) + SE(40)                                         TAMPER
      Q(23,2) = Q(23,2) - SE(40)                                         TAMPER
      GO TO 16                                                           TAMPER
    9 CONTINUE                                                           TAMPER
C     SEQUENTIAL FIRING OF BOOSTER AND ORBITER   OR                      TAMPER
C     TANDEM FIRING OF BOOSTER AND ORBITER                               TAMPER
C     THRUST AND ISP                                                     TAMPER
      Q(1,1) = BTTOT  * SE(26)                                           TAMPER
      Q(1,2) = BTTOT * SE(27)                                            TAMPER
      Q(2,1) = Q(1,1) /BWDOT1                                            TAMPER
      Q(2,2) = Q(1,2) /BWDOT2                                            TAMPER
      Q(3,1) = SE(3)                                                     TAMPER
      Q(3,2) = SE(13)                                                    TAMPER
   16 Q(3,5) = SE(16)                                                    TAMPER
      Q(3,6) = SE(18)                                                    TAMPER
      Q(3,7) = SE(20)                                                    TAMPER
      SV(11) = Q(1,1)/V(7)                                               TAMPER
      SV(13) = SV(11)*Q(3,1)/Q(2,1)                                      TAMPER
      IF(SQ(20,1).LE.0.) GO TO 18                                        TAMPER
      V(7) = V(7) + SQ(21,5)                                             TAMPER
      SV(13) = (Q(1,1) * Q(3,1) / Q(2,1) + SQ(21,4) ) / V(7)             TAMPER
   18 IF(NCALL.EQ.1) RETURN                                              TAMPER
C      GET PARAMETERS FOR PITX AND QPRIME GUESSES                        TAMPER
      PIT=Q(62,1)                                                        TAMPER
      SV(30)=SV(13)-1.                                                   TAMPER
      IF(SE(39).NE.0.) SV(30) = .5*Q(1,2)/V(7)*Q(3,2)/Q(2,2)+.5*SV(13)   TAMPER
     1   -1.                                                             TAMPER
      DELMU=TB34(3)-2.5                                                  TAMPER
      SV(23)=(1.+2.80*SV(30)*DELMU)*(1.+.0072/ SV(30)**5 )               JDA5
      IF(SW(3).GT.1.) GO TO 20                                           TAMPER
C      GUESS PITX IF NONE HAS BEEN INPUT                                 TAMPER
      TEMDEG=SIN(V(4)*.01745329251)                                      TAMPER
      TEM= SQRT(TEMDEG)                                                  JDA4
      SV(28)= .18 - .10 * TEM                                            JDA4
      SV(14)=SV(30)-SV(28)                                               TAMPER
      PFIFTY=(30.-15.*TEM)*SV(14)**2.15                                  JDA5
      DQDP=SV(17)*SV(23)                                                 JDA2
      DMU=TB34(3)-2.90                                                   JDA2
      DGDQ= -6.0 +7.2 *DMU                                               JDA2
      ICODE=IFIX(VQ(7,1))                                                JDA2
      IF(ICODE.EQ.92) SV(24)=DQDP                                        JDA2
      IF(ICODE.EQ. 3) SV(24)=DQDP*DGDQ                                   JDA2
      TARG=VQ(25,1)                                                      JDA2
      IF(ICODE.EQ. 3) TARG= 2.1 - 1.0 * DMU + VQ(25,1)/DGDQ              JDA2
      IF(ABS(SV(24)).LT..001)SV(24)=100.                                 JDA2
      IF(PIT.LE.0.) Q(62,1)=PFIFTY +   (TARG-1.700)/DQDP                 JDA2
      Q(62,2)=Q(62,1)                                                    TAMPER
      GO TO 30                                                           TAMPER
C                                                                        TAMPER
   20 CONTINUE                                                           TAMPER
C      ADJUST QPRIME = D LOG Q/ D PITX                                   TAMPER
      SV(17)=SV(24)/SV(27)                                               TAMPER
      SV(24)=SV(17)*SV(23)                                               TAMPER
C      ADJUST PITX                                                       TAMPER
      SV(14)=SV(30)-SV(28)                                               TAMPER
      Q(62,1)=PIT*(SV(14)/SV(15))**2.15 *(1.+.10*(TB34(3)-SV(16)))       JDA5
      Q(62,2)=Q(62,1)                                                    TAMPER
   30 CONTINUE                                                           TAMPER
C                                                                        JDA4
C      ESTIMATE ORBITER BURN TIME FOR LINEAR TAN STEERING OR ALPHA DOT   JDA4
C      W1 IS ORBITER IGNITION WEIGHT                                     JDA4
      W1=-Q(26,3)                                                        JDA4
C      W3 IS WT AT ORBITAL INJECTION                                     JDA4
      W3 = W1 - WFUOXO + SE(40)                                          EMS3
C      WS IS WT AT WHICH AXIAL G LIMIT IS REACHED                        JDA4
      WS = OTTOT*SE(24) / Q(66,7)                                        JDA4
      WDOT = OTTOT*SE(24) / Q(2,7)                                       JDA4
      BT57 = (W1-WS) / WDOT + Q(2,7)/Q(66,7) * ALOG(WS/W3)               JDA4
      Q(37,7)=-Q(45,6)/(BT57-Q(23,5))*0.7                                JDA5
      Q(37,6)=Q(37,7)                                                    TAMPER
      Q(37,5)=BT57                                                       JDA4
C      Q(37,7)=Q(37,6) IS ALPHA DOT FOR ORBITER TRAJECTORY               JDA4
C      Q(37,5) IS ORBITER BURN TIME ESTIMATE FOR LINEAR TANGENT STEERING JDA4
      SV(15)=SV(14)                                                      TAMPER
      SV(16)=TB34(3)                                                     TAMPER
      SV(27)=SV(23)                                                      TAMPER
      SV(34) = WWAIT(6)                                                  LT002
      RETURN                                                             TAMPER
C                                                                        TAMPER
      ENTRY ORBSUM                                                       TAMPER
C     ORBITER SUMMARY WEIGHTS                                            TAMPER
C                                                                        TAMPER
      SQ(37,4) = WFURES + WOXRES                                         EMS4
      WOP=WFU2(1)+WOX2(1)                                                WDH2
      WPAYLO = WPAYL                                                     TAMPER
      WABFUO = ABS(WABFU)                                                TAMPER
      WCONTO = WCONT                                                     TAMPER
      WDRYO = WDRY                                                       TAMPER
      WOTHO = WGROSS - WFUOXO - WABFUO - WPAYL - WDRY - SQ(37,4) - WCONT EMS4
      WORBTO = WORBIT                                                    TAMPER
      WRTRNO = WETURN                                                    TAMPER
      WENTRO = WENTRY                                                    TAMPER
      WLANDO = WLAND                                                     TAMPER
C                                                                        TAMPER
C     ORBITER SUMMARY VOLUMES                                            TAMPER
C                                                                        TAMPER
      VFUTKO = VFUTK                                                     TAMPER
      VOXTKO = VOXTK                                                     TAMPER
      VCARO = VCARGO                                                     TAMPER
      VOTHO = VBODY - VCARGO - VOXTK - VFUTK                             TAMPER
      VBODYO = VBODY                                                     TAMPER
C                                                                        TAMPER
C      ORBITER SUMMARY GEOMETRY                                          TAMPER
C                                                                        TAMPER
      LBODYO = LBODY                                                     TAMPER
      SBODYO = SBODY                                                     TAMPER
      SPLANO = SPLAN                                                     TAMPER
      WOVRSO = WOVERS                                                    TAMPER
      RETURN                                                             TAMPER
C                                                                        TAMPER
      ENTRY BOOSUM                                                       TAMPER
C     BOOSTER SUMMARY WEIGHTS                                            TAMPER
C                                                                        TAMPER
      SQ(37,5) = WFURES + WOXRES                                         EMS4
      WABFUB = ABS(WABFU)                                                TAMPER
      WFUOXB = WFUOX                                                     TAMPER
      WCONTB = WCONT                                                     TAMPER
      WDRYB = WDRY                                                       TAMPER
      WGROSB = WBOO                                                      TAMPER
      WOTHB = WGROSB - WFUOX - WABFUB - WDRY - SQ(37,5) - WCONT          EMS4
      WORBTB = WORBIT                                                    TAMPER
      WRTRNB = WETURN                                                    TAMPER
      WENTRB = WENTRY                                                    TAMPER
      WLANDB = WLAND                                                     TAMPER
C                                                                        TAMPER
C      BOOSTER SUMMARY VOLUMES                                           TAMPER
C                                                                        TAMPER
      VFUTKB = VFUTK                                                     TAMPER
      VOXTKB = VOXTK                                                     TAMPER
      VOTHB = VBODY - VFUTK - VOXTK                                      TAMPER
      VABFUB = VOXTK2 + VFUTK2                                           TAMPER
      VBODYB = VBODY                                                     TAMPER
C                                                                        TAMPER
C     BOOSTER SUMMARY GEOMETRY                                           TAMPER
C                                                                        TAMPER
      LBODYB = LBODY                                                     TAMPER
      SBODYB = SBODY                                                     TAMPER
      SPLANB = SPLAN                                                     TAMPER
      WOVRSB = WOVERS                                                    TAMPER
      RETURN                                                             TAMPER
      END                                                                TAMPER
  ELT MAIN,1,710302, 33723
  EOF "                                                                        "
C     OVERLAY(TTSS,0,0)                                                  U1108
C     PROGRAM MAIN(INPUT,OUTPUT,TAPEK=INPUT,TAPE6=OUTPUT                 U1108
C    1PUNCH,TAPE8=PUNCH)                                                 U1108
      REAL NENGS
      REAL LBODYO,LBODYB                                                 MAIN
      REAL KIN                                                           MAIN
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL NXFOB                                                         MAIN
      REAL IVACO,IVACB,ISLO,ISLB,IDVEL                                   MAIN
      DIMENSION IVACO(7),ISLO(7),TFCTRO(7),TFCTRB(4),IVACB(4),ISLB(4)    MAIN
     1 ,PRNTX(3)                                                         JDA5
      DIMENSION SKB(30),SCB(300),TB4(6),TB20(10),TB27(6),TB34(6),        LT002
     1 TB48(10),TB49(10),TB50(10),TB57(6)                                LT002
      COMMON/ORBINY/                                                     LT002
     1 TB1,TB2,TB3,TB4,TB5,TB6,TB7,TB8,TB9,TB10,TB11,TB12,TB13,TB14,     LT002
     2 TB15,TB16,TB17,TB18,TB19,TB20,TB21,IB22,IB23,IB24,IB25,IB26,TB27, LT002
     3 IB28,IB29,IB30,IB31,IB32,TB33,TB34,TB35,TB36,IB37,TB38,TB39,TB40, LT002
     4 TB41,TB42,TB43,TB44,TB45,TB46,TB47,TB48,TB49,TB50,TB51,TB52,TB53, LT002
     5 TB54,TB55,TB56,TB57,SKB,SCB                                       LT002
      COMMON/TAMP/WGROSO,OTTOT,WFUOXO,TBTO,BTTOT                         MAIN
      COMMON/SUMVW/WOP,         WABFUB,WFUOXB,WDRYB,WGROSB,WOTHB,        MAIN
     1 VFUTKB,VOXTKB,VOTHB,VBODYB,VABFUB,                                MAIN
     2 LBODYB,SBODYB,SPLANB,WOVRSB,                                      MAIN
     1              WPAYLO,WDRYO,WOTHO,  WABFUO,                         MAIN
     2 VFUTKO,VOXTKO,VCARO,VOTHO,VBODYO,                                 MAIN
     3 LBODYO,SBODYO,SPLANO,WOVRSO                                       MAIN
     4 ,WORBTO,WORBTB,WRTRNO,WRTRNB,WENTRO,WENTRB,WLANDB,WLANDO          MAIN
     5 , WCONTO,WCONTB                                                   MAIN
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/HEAD   /TITLES(10)                                          MAIN
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QX      ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      COMMON/XCLVG/CLVG                                                  MAIN
      COMMON/XDRNG/DRNG                                                  MAIN
      COMMON/XWPO/WPOREQ,WOREQ,GWREQ                                     JDA1
      COMMON/DATA2X/ ALD,FBPAR,IDVEL,ISLB,ISLO,IVACB,IVACO,PERISP,QMAX,  JDA1
     1 QMXS,SFC,SLVOUT,COPIES,SYNIT,TFCTRB,TFCTRO,TOLMU,TOLTW,           JDA5
     2 TRATIO,TWLO,TWLOI,WTOUT,FIRE,BOOTW,VCRUSE                         JDA5
     3 , NXFOB,PRNTX,FSEC                                                MAIN
     4 ,SOLID,AS,BS,SISP,SINERT,SAE,TSBO                                 JDA5
     6 ,FBFUEL,CA,CB,WFLYX,RT,R1,R3,SFC1,SFC2,SFC3,ALD1,ALD2,ALD3,VFLY1, EMS3
     7 VFLY2,VFLY3                                                       EMS3
      COMMON/FLY/FLYBCK                                                  MAIN
      COMMON/APV/ALT(200),PRS(200),VLS(200)                              MAIN
      DATA CLVG/ 1.0/                                                    MAIN
      DATA DRNG/ 0.0/                                                    MAIN
      DATA WPOREQ,WOREQ,GWREQ  /  0., 0., 3500000.  /                    JDA1
      DATA FLYBCK   /  2.  /                                             MAIN
      DATA FBFUEL,CA,CB,WFLYX,RT,R1,R3,SFC1,SFC2,SFC3,ALD1,ALD2,ALD3,    EMS3
     1 VFLY1,VFLY2,VFLY3 / 1., 9*0., 6*1.  /                             EMS3
      DATA  SOLID,AS,BS,SISP,SINERT, SAE, TSBO / 7*0./                   JDA5
      DATA NXFOB / 0. /                                                  MAIN
      DATA PRNTX,FSEC / 1., 0., 1., 0.  /                                MAIN
      DATA IVACO,ISLO,TFCTRO,TFCTRB / 7*450., 7*390., 7*1., 4*1. /       MAIN
      DATA IVACB,ISLB/4*450., 4*390. /                                   MAIN
      DATA COPIES/6./                                                    JDA5
      DATA TOLMU,SYNIT,TRATIO,PERISP,BOOTW,ALD,SFC,FBPAR,VCRUSE,FIRE     JDA1
     1 /  .00050, 5.0, 1.0, 0.810, 0.,  6.0,  0.200,250.0,300., 2. /     JDA1
      DATA WTOUT,SLVOUT,TWLO,TOLTW,TWLOI,QMXS,QMAX                       JDA1
     1 /   0.,   0.,   1.371, 0.001, -1., 900., 550.   /                 JDA1
C         THE CAPE KENNEDY REFERENCE ATMOSPHERE (CKRA)                   PRA63
C         ALSO KNOWN AS THE 1963 PATRICK REFERENCE ATMOSPHERE            PRA63
C         BASED ON MSFC COMP LAB SUBROUTINE PRA-63                       PRA63
C         REFERENCE  TM X-53973  NATURAL ENVIRONMENT CRITERIA FOR THE    PRA63
C               SPACE SHUTTLE PROGRAM    W W VAUGHAN  2/9/70             PRA63
      DATA (ALT(I), I= 1, 96) /   -30000000.,                            PRA63
     1  0.        ,  1.0000E+03,  2.0000E+03,  3.0000E+03,  4.0000E+03,  PRA63
     2  5.0000E+03,  6.0000E+03,  7.0000E+03,  8.0000E+03,  9.0000E+03,  PRA63
     3  1.0000E+04,  1.1000E+04,  1.2000E+04,  1.3000E+04,  1.4000E+04,  PRA63
     4  1.5000E+04,  1.6000E+04,  1.7000E+04,  1.8000E+04,  1.9000E+04,  PRA63
     5  2.0000E+04,  2.1000E+04,  2.2000E+04,  2.3000E+04,  2.4000E+04,  PRA63
     6  2.5000E+04,  2.6000E+04,  2.7000E+04,  2.8000E+04,  2.9000E+04,  PRA63
     7  3.0000E+04,  3.1000E+04,  3.2000E+04,  3.3000E+04,  3.4000E+04,  PRA63
     8  3.5000E+04,  3.6000E+04,  3.7000E+04,  3.8000E+04,  3.9000E+04,  PRA63
     9  4.0000E+04,  4.1000E+04,  4.2000E+04,  4.3000E+04,  4.4000E+04,  PRA63
     1  4.5000E+04,  4.6000E+04,  4.7000E+04,  4.8000E+04,  4.9000E+04,  PRA63
     2  5.0000E+04,  5.1000E+04,  5.2000E+04,  5.3000E+04,  5.4000E+04,  PRA63
     3  5.5000E+04,  5.6000E+04,  5.7000E+04,  5.8000E+04,  5.9000E+04,  PRA63
     4  6.0000E+04,  6.2000E+04,  6.4000E+04,  6.6000E+04,  6.8000E+04,  PRA63
     5  7.0000E+04,  7.2000E+04,  7.4000E+04,  7.6000E+04,  7.8000E+04,  PRA63
     6  8.0000E+04,  8.2000E+04,  8.4000E+04,  8.6000E+04,  8.8000E+04,  PRA63
     7  9.0000E+04,  9.2000E+04,  9.4000E+04,  9.6000E+04,  9.8000E+04,  PRA63
     8  1.0000E+05,  1.0200E+05,  1.0400E+05,  1.0600E+05,  1.0800E+05,  PRA63
     9  1.1000E+05,  1.1200E+05,  1.1400E+05,  1.1600E+05,  1.1800E+05,  PRA63
     1  1.2000E+05,  1.2300E+05,  1.2600E+05,  1.2900E+05,  1.3200E+05/  PRA63
      DATA (ALT(I), I= 97,193)/                                          PRA63
     2  1.3500E+05,  1.3800E+05,  1.4100E+05,  1.4400E+05,  1.4700E+05,  PRA63
     3  1.5000E+05,  1.5300E+05,  1.5600E+05,  1.5900E+05,  1.6200E+05,  PRA63
     4  1.6500E+05,  1.6800E+05,  1.7100E+05,  1.7400E+05,  1.7700E+05,  PRA63
     5  1.8000E+05,  1.8500E+05,  1.9000E+05,  1.9500E+05,  2.0000E+05,  PRA63
     6  2.0500E+05,  2.1000E+05,  2.1500E+05,  2.2000E+05,  2.2500E+05,  PRA63
     7  2.3000E+05,  2.3500E+05,  2.4000E+05,  2.4500E+05,  2.5000E+05,  PRA63
     8  2.5500E+05,  2.6000E+05,  2.6500E+05,  2.7000E+05,  2.7500E+05,  PRA63
     9  2.8000E+05,  2.8500E+05,  2.9000E+05,  2.9500E+05,  3.0000E+05,  PRA63
     1  3.1000E+05,  3.2000E+05,  3.3000E+05,  3.4000E+05,  3.5000E+05,  PRA63
     2  3.6000E+05,  3.7000E+05,  3.8000E+05,  3.9000E+05,  4.0000E+05,  PRA63
     3  4.1000E+05,  4.2000E+05,  4.3000E+05,  4.4000E+05,  4.5000E+05,  PRA63
     4  4.6000E+05,  4.7000E+05,  4.8000E+05,  4.9000E+05,  5.0000E+05,  PRA63
     5  5.5000E+05,  6.0000E+05,  6.5000E+05,  7.0000E+05,  7.5000E+05,  PRA63
     6  8.0000E+05,  8.5000E+05,  9.0000E+05,  9.5000E+05,  1.0000E+06,  PRA63
     7  1.0500E+06,  1.1000E+06,  1.1500E+06,  1.2000E+06,  1.2500E+06,  PRA63
     8  1.3000E+06,  1.3500E+06,  1.4000E+06,  1.4500E+06,  1.5000E+06,  PRA63
     9  1.5500E+06,  1.6000E+06,  1.6500E+06,  1.7000E+06,  1.7500E+06,  PRA63
     1  1.8000E+06,  1.8500E+06,  1.9000E+06,  1.9500E+06,  2.0000E+06,  PRA63
     2 2.05E6, 2.10E6, 2.15E6, 2.20E6, 2.25E6, 2.30E6, 5.00E9/           PRA63
      DATA (PRS(I), I=  1, 96)/     14.75055,                            PRA63
     1  1.4751E+01,  1.4244E+01,  1.3751E+01,  1.3273E+01,  1.2808E+01,  PRA63
     2  1.2357E+01,  1.1919E+01,  1.1494E+01,  1.1082E+01,  1.0682E+01,  PRA63
     3  1.0295E+01,  9.9191E+00,  9.5550E+00,  9.2022E+00,  8.8602E+00,  PRA63
     4  8.5288E+00,  8.2076E+00,  7.8965E+00,  7.5950E+00,  7.3029E+00,  PRA63
     5  7.0200E+00,  6.7459E+00,  6.4804E+00,  6.2233E+00,  5.9744E+00,  PRA63
     6  5.7333E+00,  5.5000E+00,  5.2741E+00,  5.0556E+00,  4.8442E+00,  PRA63
     7  4.6397E+00,  4.4421E+00,  4.2510E+00,  4.0664E+00,  3.8882E+00,  PRA63
     8  3.7161E+00,  3.5496E+00,  3.3893E+00,  3.2349E+00,  3.0862E+00,  PRA63
     9  2.9432E+00,  2.8057E+00,  2.6737E+00,  2.5469E+00,  2.4252E+00,  PRA63
     1  2.3086E+00,  2.1970E+00,  2.0901E+00,  1.9878E+00,  1.8901E+00,  PRA63
     2  1.7969E+00,  1.7079E+00,  1.6230E+00,  1.5422E+00,  1.4653E+00,  PRA63
     3  1.3921E+00,  1.3226E+00,  1.2567E+00,  1.1941E+00,  1.1359E+00,  PRA63
     4  1.0801E+00,  9.7726E-01,  8.8474E-01,  8.0151E-01,  7.2660E-01,  PRA63
     5  6.5912E-01,  5.9832E-01,  5.4349E-01,  4.9402E-01,  4.4935E-01,  PRA63
     6  4.0899E-01,  3.7249E-01,  3.3945E-01,  3.0952E-01,  2.8238E-01,  PRA63
     7  2.5774E-01,  2.3534E-01,  2.1492E-01,  1.9638E-01,  1.7954E-01,  PRA63
     8  1.6424E-01,  1.5033E-01,  1.3767E-01,  1.2614E-01,  1.1564E-01,  PRA63
     9  1.0607E-01,  9.7349E-02,  8.9389E-02,  8.2123E-02,  7.5488E-02,  PRA63
     1  6.9427E-02,  6.1296E-02,  5.4182E-02,  4.7950E-02,  4.2486E-02/  PRA63
      DATA (PRS(I), I= 97,193)/                                          PRA63
     2  3.7687E-02,  3.3468E-02,  2.9753E-02,  2.6477E-02,  2.3583E-02,  PRA63
     3  2.1022E-02,  1.8752E-02,  1.6736E-02,  1.4941E-02,  1.3342E-02,  PRA63
     4  1.1915E-02,  1.0635E-02,  9.4846E-03,  8.4520E-03,  7.5254E-03,  PRA63
     5  6.6941E-03,  5.4953E-03,  4.4977E-03,  3.6693E-03,  2.9829E-03,  PRA63
     6  2.4160E-03,  1.9491E-03,  1.5660E-03,  1.2528E-03,  9.9776E-04,  PRA63
     7  7.9096E-04,  6.2403E-04,  4.8991E-04,  3.8268E-04,  2.9739E-04,  PRA63
     8  2.2989E-04,  1.7677E-04,  1.3519E-04,  1.0282E-04,  7.7776E-05,  PRA63
     9  5.8766E-05,  4.4409E-05,  3.3564E-05,  2.5370E-05,  1.9239E-05,  PRA63
     1  1.1291E-05,  6.7945E-06,  4.1841E-06,  2.6533E-06,  1.7334E-06,  PRA63
     2  1.1626E-06,  8.0470E-07,  5.7813E-07,  4.2822E-07,  3.2670E-07,  PRA63
     3  2.5872E-07,  2.1098E-07,  1.7601E-07,  1.4954E-07,  1.2897E-07,  PRA63
     4  1.1263E-07,  9.9395E-08,  8.8517E-08,  7.9451E-08,  7.1756E-08,  PRA63
     5  4.5742E-08,  3.0813E-08,  2.1430E-08,  1.5233E-08,  1.1035E-08,  PRA63
     6  8.1197E-09,  6.0518E-09,  4.5646E-09,  3.4813E-09,  2.6823E-09,  PRA63
     7  2.0842E-09,  1.6320E-09,  1.2873E-09,  1.0226E-09,  8.1773E-10,  PRA63
     8  6.5807E-10,  5.3254E-10,  4.3298E-10,  3.5364E-10,  2.9013E-10,  PRA63
     9  2.3903E-10,  1.9775E-10,  1.6425E-10,  1.3683E-10,  1.1430E-10,  PRA63
     1  9.5740E-11,  8.0400E-11,  6.7691E-11,  5.7134E-11,  4.8334E-11,  PRA63
     2 4.096E-11, 3.478E-11, 2.958E-11, 2.520E-11, 2.150E-11, 0.,0./     PRA63
      DATA (VLS(I), I=  1, 96)/      1137.99  ,                          PRA63
     1  1.1380E+03,  1.1337E+03,  1.1296E+03,  1.1258E+03,  1.1221E+03,  PRA63
     2  1.1186E+03,  1.1152E+03,  1.1119E+03,  1.1085E+03,  1.1052E+03,  PRA63
     3  1.1019E+03,  1.0986E+03,  1.0952E+03,  1.0917E+03,  1.0882E+03,  PRA63
     4  1.0845E+03,  1.0808E+03,  1.0770E+03,  1.0730E+03,  1.0689E+03,  PRA63
     5  1.0648E+03,  1.0605E+03,  1.0561E+03,  1.0516E+03,  1.0470E+03,  PRA63
     6  1.0424E+03,  1.0376E+03,  1.0328E+03,  1.0280E+03,  1.0231E+03,  PRA63
     7  1.0181E+03,  1.0132E+03,  1.0082E+03,  1.0033E+03,  9.9841E+02,  PRA63
     8  9.9355E+02,  9.8847E+02,  9.8370E+02,  9.7905E+02,  9.7455E+02,  PRA63
     9  9.7021E+02,  9.6605E+02,  9.6210E+02,  9.5837E+02,  9.5489E+02,  PRA63
     1  9.5167E+02,  9.4872E+02,  9.4607E+02,  9.4372E+02,  9.4168E+02,  PRA63
     2  9.3998E+02,  9.3860E+02,  9.3757E+02,  9.3688E+02,  9.3653E+02,  PRA63
     3  9.3653E+02,  9.3686E+02,  9.3754E+02,  9.3853E+02,  9.4229E+02,  PRA63
     4  9.4399E+02,  9.4748E+02,  9.5103E+02,  9.5459E+02,  9.5812E+02,  PRA63
     5  9.6158E+02,  9.6493E+02,  9.6815E+02,  9.7121E+02,  9.7409E+02,  PRA63
     6  9.7680E+02,  9.7934E+02,  9.8169E+02,  9.8389E+02,  9.8595E+02,  PRA63
     7  9.8790E+02,  9.8990E+02,  9.9277E+02,  9.9565E+02,  9.9856E+02,  PRA63
     8  1.0015E+03,  1.0044E+03,  1.0074E+03,  1.0105E+03,  1.0135E+03,  PRA63
     9  1.0166E+03,  1.0198E+03,  1.0229E+03,  1.0261E+03,  1.0294E+03,  PRA63
     1  1.0326E+03,  1.0375E+03,  1.0424E+03,  1.0473E+03,  1.0521E+03/  PRA63
      DATA (VLS(I), I= 97,193)/                                          PRA63
     2  1.0568E+03,  1.0614E+03,  1.0658E+03,  1.0698E+03,  1.0736E+03,  PRA63
     3  1.0770E+03,  1.0798E+03,  1.0822E+03,  1.0839E+03,  1.0836E+03,  PRA63
     4  1.0811E+03,  1.0782E+03,  1.0749E+03,  1.0712E+03,  1.0671E+03,  PRA63
     5  1.0628E+03,  1.0549E+03,  1.0464E+03,  1.0373E+03,  1.0279E+03,  PRA63
     6  1.0181E+03,  1.0082E+03,  9.9814E+02,  9.8805E+02,  9.7798E+02,  PRA63
     7  9.6798E+02,  9.5808E+02,  9.4828E+02,  9.3858E+02,  9.2892E+02,  PRA63
     8  9.1925E+02,  9.0947E+02,  8.9945E+02,  8.8903E+02,  8.8400E+02,  PRA63
     9  8.8400E+02,  8.8400E+02,  8.8400E+02,  8.8400E+02,  8.9450E+02,  PRA63
     1  9.1635E+02,  9.3768E+02,  9.6117E+02,  9.9488E+02,  1.0275E+03,  PRA63
     2  1.0591E+03,  1.1170E+03,  1.1745E+03,  1.2293E+03,  1.3138E+03,  PRA63
     3  1.4106E+03,  1.5012E+03,  1.5866E+03,  1.6676E+03,  1.7449E+03,  PRA63
     4  1.8189E+03,  1.8900E+03,  1.9585E+03,  2.0247E+03,  2.0764E+03,  PRA63
     5  2.2660E+03,  2.3721E+03,  2.4532E+03,  2.5195E+03,  2.5841E+03,  PRA63
     6  2.6358E+03,  2.6853E+03,  2.7340E+03,  2.7818E+03,  2.8262E+03,  PRA63
     7  2.8644E+03,  2.9022E+03,  2.9394E+03,  2.9762E+03,  3.0125E+03,  PRA63
     8  3.0484E+03,  3.0782E+03,  3.1060E+03,  3.1334E+03,  3.1607E+03,  PRA63
     9  3.1877E+03,  3.2144E+03,  3.2392E+03,  3.2565E+03,  3.2736E+03,  PRA63
     1  3.2907E+03,  3.3077E+03,  3.3246E+03,  3.3414E+03,  3.3544E+03,  PRA63
     2 3365.,3376.,3387.,3397.,3408.,3418.,3418./                        PRA63
C                                                                        PRA63
      FW(A,B,C,D) = WA * (1. - 1./EXP(1.689*A/C*B/D))                    EMS3
C                                                                        MAIN
      SV(17)=3.5                                                         JDA5
      SV(20)=35.                                                         JDA5
C                                                                        MAIN
      CALL CHECK                                                         MAIN
C                                                                        MAIN
   10 SW(1) = 1.1                                                        MAIN
      W(37) = 0.                                                         MAIN
C                                                                        MAIN
C  ****  SYNTH   CALL 1  ****                                            MAIN
C                                                                        MAIN
   99 SW(3) = 0.                                                         MAIN
C     CALL OVERLAY(TTSS,1,0,6HRECALL)                                    U1108
      CALL SYNTH                                                         U1108
  100 SW(1) = 2.1                                                        MAIN
C                                                                        MAIN
C  ****  WTVOL  ****                                                     MAIN
C     CALL OVERLAY(TTSS,3,0,6HRECALL)                                    U1108
      CALL WTVOL                                                         U1108
      IF(W(36).GT..5) GO TO 998                                          JDA1
C                                                                        MAIN
C  ****  GTSM  ****                                                      MAIN
C                                                                        MAIN
      SV(35) = 1.1                                                       LT002
      SV(43) = 1.1                                                       LT002
C     CALL OVERLAY(TTSS,2,0,6HRECALL)                                    U1108
      CALL GTSM                                                          U1108
      IF(W(36).GT..5) GO TO 998                                          MAIN
C                                                                        MAIN
C  ****  SYNTH   CALL 2  ****                                            MAIN
C     CALL OVERLAY(TTSS,1,0,6HRECALL)                                    U1108
      CALL SYNTH                                                         U1108
      IF(SV(35).LT.1.5) GO TO 11                                         LT002
      ISND = IFIX(SV(43))                                                LT002
      GO TO (21,22,23), ISND                                             LT002
   22 SW(2) = .5                                                         LT002
      GO TO 21                                                           LT002
   23 SW(2) = 1.                                                         LT002
C  21 CALL OVERLAY(TTSS,2,0,6HRECALL)                                    U1108
   21 CALL GTSM                                                          U1108
      GO TO (31,32,33), ISND                                             LT002
   32 SW(2) = 1.                                                         LT002
      GO TO 31                                                           LT002
   33 SW(2) = 2.                                                         LT002
   31 IF(W(36).GT..5) GO TO 998                                          LT002
      SW(15) = Z(95) + SQ(10,3)                                          EMS3
C  ****  SW(15) IS THE FLYBACK RANGE  ****                               LT002
   11 CONTINUE                                                           EMS3
      IFLY = SQ(32,1)                                                    EMS3
      GO TO (600,650,700),IFLY                                           EMS3
  600 CONTINUE                                                           EMS3
      DMUB = TB34(3) - SQ(19,2)                                          LT002
      IF(SW(3).GT.1.5.AND.ABS(DMUB).GT..001)                             LT002
     1 SE(8) = (SW(15) - SQ(19,1))/DMUB                                  LT002
      SQ(19,1) = SW(15)                                                  LT002
      SQ(19,2) = TB34(3)                                                 LT002
      SQ(19,3) = SW(14)/SW(12)*SW(11)/1.689                              EMS3
      SCB(214)=EXP(SW(15)/SQ(19,3))                                      EMS3
      SCB(214) = SCB(214) * SV(34)/(SV(34) - SQ(32,4))                   EMS3
      SCB(214) = SCB(214) - 1.                                           LT002
      GO TO 800                                                          EMS3
  650 CONTINUE                                                           EMS3
      DWF = SQ(32,2) * SV(34)                                            EMS3
      SQ(35,2) = DWF                                                     EMS3
      WA = SV(34) - DWF                                                  EMS3
      R2 = SW(15) - SQ(32,5) - SQ(33,1) - SQ(33,2)                       EMS3
      DW = FW(R2,SQ(33,4),SQ(34,2),SQ(34,5))                             EMS3
      SQ(35,3) = DW                                                      EMS3
      WA = WA - DW                                                       EMS3
      DWF = DWF + DW                                                     EMS3
      DW = SQ(32,3) * WA                                                 EMS3
      SQ(35,4) = DW                                                      EMS3
      GO TO 790                                                          EMS3
  700 CONTINUE                                                           EMS3
      WA=SV(34)
      DWF = FW(R1,SQ(33,3),SQ(34,1),SQ(34,4) )                           EMS3
      SQ(35,2) = DWF                                                     EMS3
      WA = SV(34) - DWF                                                  EMS3
      R2 = SW(15) - SQ(32,5) - SQ(33,1) - SQ(33,2)                       EMS3
      DW = FW(R2,SQ(33,4),SQ(34,2),SQ(34,5))                             EMS3
      SQ(35,3) = DW                                                      EMS3
      DWF = DWF + DW                                                     EMS3
      WA = WA - DW                                                       EMS3
      DW = FW(R3,SQ(33,5),SQ(34,3),SQ(35,1) )                            EMS3
      SQ(35,4) = DW                                                      EMS3
  790 CONTINUE                                                           EMS3
      DWF = DWF + DW + SQ(32,4)                                          EMS3
      WA = WA - DW - SQ(32,4)                                            EMS3
      SCB(214) = DWF/WA                                                  EMS3
      SQ(19,3) = SQ(34,5)/1.689*SQ(34,2)/SQ(33,4)                        EMS3
      SQ(35,5) = R2                                                      EMS3
  800 CONTINUE                                                           EMS3
      IF(ABS(SV(43)-3.1).GE..5) GO TO 34                                 LT002
      SW(1) = 3.1                                                        LT002
C     CALL OVERLAY(TTSS,1,0,6HRECALL)                                    U1108
      CALL SYNTH                                                         U1108
   34 IF(SW(2).GT.1.) GO TO 10                                           LT002
      GO TO 100                                                          MAIN
C                                                                        MAIN
  998 IF(V(64).LT..5) GO TO 999                                          MAIN
      V(64) = .1                                                         MAIN
      SW(1) = 1.1                                                        MAIN
      GO TO 99                                                           MAIN
  999 STOP                                                               MAIN
      END                                                                MAIN
  ELT AERO3,1,710302, 33726
  EOF "                                                                        "
      SUBROUTINE AERO3(M)
      DIMENSION D(12)
      DIMENSION ITRP(5),KTRP(5),ISND(5),JMX(5),LMX(5),XW3(5),XW4(5)
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/AEROX/XW3,XW4
 1001 FORMAT(83H0 ****   FAILURE IN THE TABLE LOOK-UP OF SUBROUTINE AERO
     13 DURING SIMULATION SECTION,I3,7H   ****///)
      IF(XW4(M).GT..5) GO TO 10
      XW4(M) = 1.1
      ITRP(M) = 2
      KTRP(M) = 2
      ISND(M) = M
      JMX(M) = XNA2(1,M)
      LMX(M) = XNA2(2,M)
   10 ITRIP = ITRP(M)
      KTRIP = KTRP(M)
      ISEND = ISND(M)
      JMAX = JMX(M)
      LMAX = LMX(M)
      IF(Z(40).GT.XM3(ITRIP,ISEND)) GO TO 11
      JSTOP = ITRIP - 1
      DO 14 J=1,JSTOP
      I = ITRIP - J + 1
      IF(Z(40).GE.XM3(I-1,ISEND)) GO TO 13
   14 CONTINUE
      GO TO 998
   11 JSTOP = JMAX - ITRIP
      IF(JSTOP.LE.0) GO TO 998
      DO 12 J=1,JSTOP
      I = ITRIP + J
      IF(Z(40).LE.XM3(I,ISEND)) GO TO 13
   12 CONTINUE
      GO TO 998
   13 ITRIP = I
      IF(Z(12).GT.A3(KTRIP,ISEND)) GO TO 15
      LSTOP = KTRIP - 1
      DO 18 L=1,LSTOP
      K = KTRIP - L + 1
      IF(Z(12).GE.A3(K-1,ISEND)) GO TO 17
   18 CONTINUE
      GO TO 998
   15 LSTOP = LMAX - KTRIP
      IF(LSTOP.LE.0) GO TO 998
      DO 16 L=1,LSTOP
      K = KTRIP + L
      IF(Z(12).LE.A3(K,ISEND)) GO TO 17
   16 CONTINUE
  998 W(4) = .1
      Z(23) = 0.
      WRITE(6,1001) NSEC
      CALL PAROUT
      W(32) = 1.1
      GO TO 999
   17 KTRIP = K
      ARG1 = (Z(40) - XM3(I-1,ISEND))/(XM3(I,ISEND) - XM3(I-1,ISEND))
      D(K) = C3(I-1,K,ISEND) + ARG1*(C3(I,K,ISEND) - C3(I-1,K,ISEND))
      D(K-1) = C3(I-1,K-1,ISEND) + ARG1*(C3(I,K-1,ISEND) - C3(I-1,K-1,IS
     1END))
      ARG2 = (Z(12) - A3(K-1,ISEND))/(A3(K,ISEND) - A3(K-1,ISEND))
      Z(23) = D(K-1) + ARG2*(D(K) - D(K-1))
  999 ITRP(M) = ITRIP
      KTRP(M) = KTRIP
      RETURN
      END
  ELT BLDA,1,710302, 33727
  EOF "                                                                        "
      BLOCK DATA                                                         MSCC
      REAL                                                               MSCC
     1 LAT,   LNG,   ITT1,  ITT2,  ITT3,  LAM,   MULT,  JETW,  LAMC,     MSCC
     2 LAMDT                                                             MSCC
      DIMENSION                                                          MSCC
     1 TWD11(15), TWD12(15), TWD13(15), AREF1(15), AREF2(15), AREF3(15), MSCC
     2 STEP(15),  TOL1(15),  TOL2(15),  TOL3(15),  TOL4(15),  TOL5(15),  MSCC
     3 TOL6(15),  TOL7(15),  HTL1(15),  HTL2(15),  HTL3(15),  HTL4(15),  MSCC
     4 HTL5(15),  HTL6(15),  HTL7(15),  STGC(15),  STGV(15),  STGT(15),  MSCC
     5 STGD(15),  JETW(15),  ATMC(15),  AC1(15),   AC2(15),   AC3(15),   MSCC
     6 TWC(15),   SIGC(15),  ALPC(15),  LAMC(15),  PSIDT(15), SIGDT(15), MSCC
     7 ALPDT(15), LAMDT(15), HMIN(15),  HCOEF(15), BCKT(15),  BCKTT(15), MSCC
     8 SPSI(15),  SSIG(15),  SALP(15),  SLAM(15),  XKA1(1,1), XKA2(2,5), MSCC
     9 XKA3(2,5), TWD1(15),  TWD2(15),  TWD3(15),  TWD4(15),  TWD5(2),   MSCC
     1 TWD6(15),  TWD10(15), GDOT(15),  XOUT(15),  CVC1(4),   CVC2(4),   MSCC
     2 CVC3(4),   CVN1(4),   CVN2(4),   CVN3(4),   ECC1(4),   ECC2(4),   MSCC
     3 ECC3(4),   ECN1(4),   ECN2(4),   ECN3(4),   DCV1(4),   DCV2(4),   MSCC
     4 DCV3(4),   CVM1(4),   CVM2(4),   CVM3(4),   CVL1(4),   CVL2(4),   MSCC
     5 CVL3(4),   ECT1(4),   ECT2(4),   ECT3(4),   EC1(4),    EC2(4),    MSCC
     6 EC3(4),    GIS(4),    ITT1(4),   ITT2(4),   ITT3(4),   CRGF(4),   MSCC
     7 TLAT(4),   TLNG(4),   TOL8(15),  HTL8(15),  ORB(15),   GMC1(15),  MSCC
     8 GMC2(15),  GMC3(15),  GMC4(15),  XKPT(4),   PITX(15),  PSEC(15),  MSCC
     9 PTME(15),  PRIF(15),  TWD14(15), VSET(15),  VINC(15),  WOUT(15),  MSCC
     1 RDALT(4)                                                          MSCC
      COMMON/DATAX/ HANM,HPNM,TRANOM ,                                   MSCC
     1 RAD,   VEL,   GAM,   AZM,   LAT,   LNG,   WGH,   ALT0,  SEC,      MSCC
     2 PLD,   CVC1,  CVC2,  CVC3,  CVN1,  CVN2,  CVN3,  ECC1,  ECC2,     MSCC
     3 ECC3,  ECN1,  ECN2,  ECN3,  DCV1,  DCV2,  DCV3,  CVM1,  CVM2,     MSCC
     4 CVM3,  CVL1,  CVL2,  CVL3,  ECT1,  ECT2,  ECT3,  G0,    CK,       MSCC
     5 WE,    D2,    D3,    D4,    AGQ,   ATQ,   P0,    CNV1,  CNV2,     MSCC
     6 CNV3,  ALTQ,  STPF,  A, B, RDALT,  T0,    EC1,   EC2,   EC3,      MSCC
     7 GIS,   ZOUT,  ITT1,  ITT2,  ITT3,  PSI,   SIG,   ALP,   LAM,      MSCC
     8 MULT,  VELQ,  PRNT,  PSIF,  CRGF,  TLAT,  TLNG,  ALTF,  AZMF,     MSCC
     9 TWE,   TWD11, TWD12, TWD13, AREF1, AREF2, AREF3, STEP,  TOL1,     MSCC
     1 TOL2,  TOL3,  TOL4,  TOL5,  TOL6,  TOL7,  HTL1,  HTL2,  HTL3,     MSCC
     2 HTL4,  HTL5,  HTL6,  HTL7,  STGC,  STGV,  STGT,  STGD,  JETW,     MSCC
     3 ATMC,  AC1,   AC2,   AC3,   TWC,   SIGC,  ALPC,  LAMC,  PSIDT,    MSCC
     4 SIGDT, ALPDT, LAMDT, HMIN,  HCOEF, BCKT,  BCKTT, SPSI,  SSIG,     MSCC
     5 SALP,  SLAM,  YOUT,  CNV4,  XKA0,  XKA1,  VSET,  VINC,  WOUT,     MSCC
     6 XKA2,  XKA3,  RFCN,  AZMI,  GTIP,  TWD1,  TWD2,  TWD3,  TWD4,     MSCC
     7 TWD5,  TWD6,  TWD14, PRIF,  PTME,  TWD10, VGAI,  GDOT,  XOUT,     MSCC
     8 TOL8,  HTL8,  ORB,   GMC1,  GMC2,  GMC3,  GMC4,  XKPT,  PITX,     MSCC
     9 PSEC                                                              MSCC
      DATA  HANM, HPNM,TRANOM / 3*0./ ,                                  MSCC
     1 RAD,         VEL,         GAM,         AZM,         LAT,          MSCC
     2 LNG,         WGH,         ALT0,        SEC,         PLD,          MSCC
     3 CVC1,        CVC2,        CVC3,        CVN1,        CVN2,         MSCC
     4 CVN3,        ECC1,        ECC2,        ECC3,        ECN1,         MSCC
     5 ECN2,        ECN3,        DCV1,        DCV2,        DCV3,         MSCC
     6 CVM1,        CVM2,        CVM3,        CVL1,        CVL2,         MSCC
     7 CVL3,        ECT1,        ECT2,        ECT3,        G0,           MSCC
     8 CK,          WE,          D2,          D3,          D4,           MSCC
     9 AGQ,         ATQ,         P0,          CNV1,        CNV2/         MSCC
     1 0.,          0.,          90.,         270.,        34.5815,      MSCC
     2 -120.6233,   0.,          0.,          7.,          0.,           MSCC
     3 4*0.,        4*0.,        4*0.,        4*0.,        4*0.,         MSCC
     4 4*0.,        4*0.,        4*0.,        4*0.,        4*0.,         MSCC
     5 4*0.,        4*0.,        4*0.,        4*0.,        4*0.,         MSCC
     6 4*0.,        4*0.,        4*0.,        4*0.,        4*0.,         MSCC
     7 4*0.,        4*0.,        4*0.,        4*0.,        32.174049,    MSCC
     8 1.407654 E16, .41780746 E-2, 1082.30 E-6, -2.30 E-6, -1.80 E-6,   MSCC
     9  85.,0.,14.751,3.14159265,57.29578 /
      DATA                                                               MSCC
     1 CNV3,        ALTQ,        STPF,        A,           B,            MSCC
     2 T0,          EC1,         EC2,         EC3,         GIS,          MSCC
     3 ZOUT,        ITT1,        ITT2,        ITT3,        PSI,          MSCC
     4 SIG,         ALP,         LAM,         MULT,        VELQ,         MSCC
     5 PRNT,        PSIF,        CRGF,        TLAT,        TLNG,         MSCC
     6 ALTF,        AZMF,        TWE,         RFCN,        AZMI,         MSCC
     7 GTIP,        VGAI,        YOUT,        CNV4,        RDALT/        MSCC
     1 6076.1033,   300000.,     0.,          20925741.,   20855591.,    MSCC
     2 0.,          4*0.,        4*0.,        4*0.,        4*0.,         MSCC
     3 0.,          4*10.,       4*10.,       4*10.,       0.,           MSCC
     4 0.,          0.,          0.,          0.,          10.,          MSCC
     5 0.,          1.,          4*0.,        4*0.,        4*0.,         MSCC
     6 0.,          0.,          1800.,       0.,          1000.,        MSCC
     7 1000.,       0.,          0.,          .30480061 E-3, 4*0./       MSCC
      DATA                                                               MSCC
     1 TWD11,       TWD12,       TWD13,       AREF1,       AREF2,        MSCC
     2 AREF3,       STEP,        TOL1,        TOL2,        TOL3,         MSCC
     3 TOL4,        TOL5,        TOL6,        TOL7,        HTL1,         MSCC
     4 HTL2,        HTL3,        HTL4,        HTL5,        HTL6/         MSCC
     1 15*0.,       15*0.,       15*0.,       15*0.,       15*0.,        MSCC
     2 15*0.,       2., 14*5.,   15*1.,       15*.5,       15*.1,        MSCC
     3 15*.1,       15*.1,       15*.1,       15*1.,       15*.1,        MSCC
     4 15*.05,      15*.01,      15*.01,      15*.01,      15*.01/       MSCC
      DATA                                                               MSCC
     5 HTL7,        STGC,        STGV,        STGT,        STGD,         MSCC
     6 JETW,        ATMC,        AC1,         AC2,         AC3,          MSCC
     7 TWC,         SIGC,        ALPC,        LAMC,        PSIDT,        MSCC
     8 SIGDT,       ALPDT,       LAMDT,       HMIN,        HCOEF,        MSCC
     9 BCKT,        BCKTT,       SPSI,        SSIG,        SALP/         MSCC
     5 15*.1,       15*0.,       15*0.,       15*.001,     15*1.,        MSCC
     6 15*0.,       15*0.,       15*0.,       15*0.,       15*0.,        MSCC
     7 15*0.,       15*1.,       15*1.,       15*1.,       15*0.,        MSCC
     8 15*0.,       15*0.,       15*0.,       15*.05,      15*2.,        MSCC
     9 15*500.,     15*.001,     15*0.,       15*0.,       15*0./        MSCC
      DATA                                                               MSCC
     1 SLAM,        XKA0,        XKA1,        XKA2,        XKA3,         MSCC
     2 TWD1,        TWD2,        TWD3,        TWD4,        TWD5,         MSCC
     3 TWD6,        TWD10,       GDOT,        XOUT,        TOL8,         MSCC
     4 HTL8,        ORB,         GMC1,        GMC2,        GMC3,         MSCC
     5 GMC4,        XKPT,        PITX,        PSEC,        PTME,         MSCC
     6 PRIF,        TWD14,       VSET,        VINC,        WOUT/         MSCC
     1 15*0.,       193.,        0.,          10*0.,       10*0.,        MSCC
     2 15*1.,       15*0.,       15*1.,       15*0.,       2*0.,         MSCC
     3 15*0.,       15*0.,       15*0.,       15*1.,      15*50000000.,  MSCC
     4 15*10000000.,15*0.,       15*0.,       15*0.,       15*0.,        MSCC
     5 15*0.,       4*0.,        15*1.,       15*1.,       15*0.,        MSCC
     6 15*0.,       15*0.,       15*0.,       15*0.,       15*0./        MSCC
      END                                                                MSCC
  ELT SOLVE,1,710302, 33729
  EOF "                                                                        "
      SUBROUTINE SOLVE                                                   SOLVE
C   THIS VERSION OF SOLVE DRIVES SUBROUTINE WTSCH TO CLOSE ON WEIGHT     JDA7
C                                                                        SOLVE
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL NENGS
      REAL MIN,MAX                                                       WDH3
      COMMON NSEC,T,TR,TS(15),V(85),Q(73,15),W(50),Z(120),EC(3),CV(3),   LT002
     1 VQ(38,4),WQ(13,4),XM1(1,1),A1(1,1),C1(1,1,1),XM2(25,5),A2(12,5),  LT002
     2 C2(25,12,5),XM3(25,5),A3(12,5),C3(25,12,5),XNA0,XNA1(1,1),        LT002
     3 XNA2(2,5),XNA3(2,5),XNP(2),PST(25),TWD7(25,2),TWD8(25,2),SW(50),  LT002
     4 TWD9(25,2),PT(25,4),PDT(25,4),XNPT(4),SV(50),SQ(40,5),SE(40),     LT002
     5 PS(15)                                                            LT002
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,QMX     ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      IF(SW(13).GT.2.5) WRITE(6,1001)                                    SOLVE
C                                                                        JDA7
      WK=MR(3)                                                           JDA7
      IF(TOL.LT.1..OR.TOL.GT.100.) TOL = 5.                              JDA7
      ITER =0                                                            JDA7
      MAX=2.5*WGROSS                                                     JDA7
      MIN=0.4*WGROSS                                                     JDA7
C                                                                        JDA7
      V1=VBODY                                                           JDA7
      W1 = WGROSS                                                        JDA7
      CALL WTSCH                                                         JDA7
 5005    CONTINUE                                                        U1108
      DW1=WGROSS-W1                                                      JDA7
      DV1=VBODY -V1                                                      JDA7
C                                                                        JDA7
   10 CONTINUE                                                           JDA7
      W2=WGROSS+WK*DW1                                                   JDA7
      R=W2/WGROSS                                                        JDA7
      V2=VBODY*R                                                         JDA7
      VBODY=V2                                                           JDA7
      WGROSS=W2                                                          JDA7
      ITER=ITER+1                                                        JDA7
      CALL WTSCH                                                         JDA7
      DW2=WGROSS-W2                                                      JDA7
      DV2=VBODY -V2                                                      JDA7
      IF(W2.GT.MAX.OR.W2.LT.MIN) GO TO 120                               JDA7
      IF(ABS(DW2).LT.TOL.AND.ABS(DV2).LT.5.) GO TO 100                   JDA7
      IF(ITER.GT.15)GO TO 110                                            JDA7
      WK=(W2-W1)/(DW1-DW2) - 1.                                          JDA7
      IF(WK.GT.5.) WK=5.                                                 JDA7
      IF(WK.LT.2.) WK=2.                                                 JDA7
      W1 = W2                                                            JDA7
      DW1 = DW2                                                          JDA7
      V1 = V2                                                            JDA7
      DV1 = DV2                                                          JDA7
      IF(SW(13).GT.2.5) WRITE(6,1000)  W2,DW2, V2,DV2, WK,ITER           JDA7
      IF(0) 5005,10,5005
C     THIS CARD NECESSARY TO PROGRAM AROUND COMPILER                     U1108
C     OPTIMIZATION BUG ON UNIVAC 1108 EXEC II.                           U1108
C                                                                        JDA7
C                                                                        JDA7
  110 CONTINUE                                                           JDA7
  100 CONTINUE                                                           JDA7
      IF(SW(13).EQ.2.0) WRITE(6,1001)                                    JDA7
      IF(SW(13).GT.1.5) WRITE(6,1000)  W2,DW2, V2,DV2, WK,ITER           JDA7
      RETURN                                                             JDA7
  120 CONTINUE                                                           JDA7
      WRITE(6,1002)                                                      JDA7
 1002 FORMAT(10X,30H ***** BLOWUP IN SOLVE *****   //)                   JDA7
      WRITE(6,1001)                                                      JDA7
                        WRITE(6,1000)  W2,DW2, V2,DV2, WK,ITER           JDA7
      RETURN                                                             JDA7
 1000 FORMAT( 5X,2( F12.2,F12.4),F12.3,I4 )                              JDA7
 1001 FORMAT(/9X,2HW2 10X,3HDW2 8X, 2HV2 10X, 3HDV2 10X,                 JDA7
     1 2HWK 8X,4HITER  )                                                 JDA7
C                                                                        JDA7
      END                                                                SOLVE
  ELT WTSCH,1,710302, 33737
  EOF "                                                                        "
      SUBROUTINE WTSCH                                                   WDH1
C ***  WTSCH   ***                                                       WDH1
C                                                                        WDH1
C     WTSCH SUBROUTINE REPROGRAMED BY WALTER D. HONEYCUTT                WDH1
C     AND B. H. OMAN ON 9/17/70 INPUT  DECKS PRIOR TO THIS DATA ARE NO   WDH1
C     LONGER VALID                                                       WDH1
C                                                                        WDH1
      REAL NENGS
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
C                                                                        WDH1
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
C                                                                        WDH1
      COMMON NSEC,T,TR,XXX(3257),SW(20),YYY(422)                         WDH1
      COMMON/JUMPY/JUMP,WBIG,WBOO                                        WDH1
C                                                                        WDH1
      NAMELIST/MASS1/                                                    WDH1
     1ABFSYS  ,BBODY   ,CROOT   ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH1
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH1
     3SPLAN   ,STPS    ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH1
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH1
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH1
     6VOXTK2  ,VPROP   ,VSTRUC  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH1
     7WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH1
     8WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH1
     9WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH1
     *WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST       WDH1
      NAMELIST/MASS2/                                                    WDH1
     *WFU2    ,WFUEL   ,WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH1
     *WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH1
     *WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH1
     *WJET    ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH1
     *WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX     ,WOX2    ,WOXID   ,    WDH1
     *WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH1
     *WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH1
     *WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH1
     *WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH1
     *WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT   ,    WDH1
     *WWET    ,WWING   ,WZROFU                                           WDH1
C                                                                        WDH1
C     *************  END  COMMON *************************************** WDH1
C                                                                        WDH1
C                                                                        WDH1
C     INITALIZE VARIABLES                                                WDH1
C                                                                        WDH1
C                                                                        WDH1
      WTO=WGROSS                                                         WDH1
      C13=1./3.                                                          WDH1
      C23=2./3.                                                          WDH1
      RTOD=57.3                                                          WDH1
      WPREIG=C(134)                                                      WDH1
      WWAIT(1)=WGROSS-WPREIG                                             WDH1
C                                                                        WDH1
C        CALCULATE PROPELLANT WEIGHTS                                    WDH1
C                                                                        WDH1
C     COMPUTE FUEL PERCENTAGE                                            WDH1
C                                                                        WDH1
      DO 10 I=1,6                                                        WDH1
C                                                                        WDH1
      IF (CFUEL(I).GE.1.0) CFUEL(I)=1./(CFUEL(I)+1.)                     WDH1
C                                                                        WDH1
C     COMPUTE MASS RATIO                                                 WDH1
C                                                                        WDH1
      IF(ISP(I).NE.0..AND.MR(I).GT.15.)MR(I)=EXP(MR(I)/32.174/ISP(I))    WDH1
      IF(MR(I).EQ.0.0) MR(I)=1.                                          WDH1
C                                                                        WDH1
   10 CONTINUE                                                           WDH1
C                                                                        WDH1
C                                                                        WDH1
C     COMPUTE JETTSION WEIGHT                                            WDH1
C                                                                        WDH1
      WJET(1)=0.0                                                        WDH1
      WJET(2)=0.0                                                        WDH1
      IF(JUMP.EQ.0)                                                      WDH1
     1WJET(3)=WFROST                                                     WDH1
      WJET(4)=WFUTRP+WOXTRP+WSRTRP+WDECAY+WFURES+WOXRES                  WDH1
      WJET(5)=WACSFO+WFULOS+WOXLOS+WPOWFO+WGASPR+WACRES+WPOWRS           WDH1
      WJET(6)=0.0                                                        WDH1
      WFUL=0.0                                                           WDH1
      WOXID=0.0                                                          WDH1
C                                                                        WDH1
C     COMPUTE PROPELLANT WEIGHT                                          WDH1
C                                                                        WDH1
      DO 40 I=1,4                                                        WDH1
C                                                                        WDH1
      WFUOX=0.                                                           WDH1
      IF (MR(I).NE.0.) WFUOX=WWAIT(I)*(MR(I)-1.)/MR(I)                   WDH1
C                                                                        WDH1
C     COMPUTE FUEL WEIGHTS                                               WDH1
C                                                                        WDH1
      WFUEL(I)=WFUOX*CFUEL(I)                                            WDH1
C                                                                        WDH1
C     COMPUTE LOX WEIGHTS                                                WDH1
C                                                                        WDH1
      WOX(I)=WFUOX-WFUEL(I)                                              WDH1
C                                                                        WDH1
C     THRUST BUILD UP PROPELLANTS INPUT CONSTANT                         WDH1
C                                                                        WDH1
      IF (I.NE.1) GO TO 30                                               WDH1
C                                                                        WDH1
      WFUEL(I)=WFUEL(I)+C(132)                                           WDH1
      WOX(I)=WOX(I)+C(133)                                               WDH1
      WFUOX=WFUEL(I)+WOX(I)                                              WDH1
C                                                                        WDH1
   30 CONTINUE                                                           WDH1
C                                                                        WDH1
C     COMPUTE VEHICLE WEIGHTS                                            WDH1
C                                                                        WDH1
      IF(I.EQ.4) GO TO 40                                                WDH5
C                                                                        WDH5
      WWAIT(I+1)=WWAIT(I)-WFUOX-WJET(I)                                  WDH1
C                                                                        WDH1
C     SUM  FUEL WEIGHTS                                                  WDH1
C                                                                        WDH1
C                                                                        WDH4
      WFUL=WFUL+WFUEL(I)                                                 WDH1
C                                                                        WDH1
C     SUM  LOX WEIGHTS                                                   WDH1
C                                                                        WDH1
      WOXID=WOXID+WOX(I)                                                 WDH1
C                                                                        WDH1
   40 CONTINUE                                                           WDH1
C                                                                        WDH5
      WWAIT(5)=WWAIT(4)-WJET(4)                                          WDH5
C                                                                        WDH1
C     COMPUTE TOTAL THRUST                                               WDH1
C                                                                        WDH1
      TTOT=CTHRST*WWAIT(3)+C(129)*NENGS+C(232)                           WDH1
C                                                                        WDH1
C     TOTAL THRUST/1000000                                               WDH1
C                                                                        WDH1
      TTOTAL=TTOT/1000000.                                               WDH1
C                                                                        WDH1
C     COMPUTE SECONDARY THRUST                                           WDH1
C                                                                        WDH1
      TTOT2=WWAIT(4)*CTHST2+C(158)                                       WDH1
C                                                                        WDH1
C     COMPUTE ACS PROPELLANTS                                            WDH1
C                                                                        WDH1
      WACSFO=C(173)*WTO+C(174)*WWAIT(4)+C(175)                           WDH1
C                                                                        WDH1
C     COMPUTE POWER SOURCE PROPELLANTS                                   WDH1
C                                                                        WDH1
      WPOWFO=C(38)*WWAIT(6)+C(127)                                       WDH1
C                                                                        WDH1
C     COMPUTE SERVICE ITEM LOSSES                                        WDH1
C                                                                        WDH1
      WOIL=C(130)*TTOT+C(131)                                            WDH1
C                                                                        WDH1
C     COMPUTE MAIN FUEL RESERVES                                         WDH1
C                                                                        WDH1
      WFURES=C(115)*WFUEL(3)+C(116) + WFUEL(4)                           JDA9
C                                                                        WDH1
C     COMPUTE MAIN LOX RESERVES                                          WDH1
C                                                                        WDH1
      WOXRES=C(117)*WOX  (3)+C(118) +WOX(4)                              JDA9
C                                                                        WDH1
C     COMPUTE ACS PROPELLANT RESERVE                                     WDH1
C                                                                        WDH1
      WACRES=C(172)*WACSFO+C(73)                                         WDH1
C                                                                        WDH1
C     COMPUTE POWER SOURCE PROPELLANT RESERVE                            WDH1
C                                                                        WDH1
      WPOWRS=C(119)*WPOWFO+C(120)                                        WDH1
C                                                                        WDH1
C     COMPUTE SERVICE ITEM RESERVES                                      WDH1
C                                                                        WDH1
      WOILRS=C(121)*WOIL+C(122)                                          WDH1
C                                                                        WDH1
C     SUM PROPELLANT RESERVES                                            WDH1
C                                                                        WDH1
      WRESRV=WFURES+WOXRES+WACRES +WPOWRS+WOILRS                         JDA9
C                                                                        WDH1
C     COMPUTE SECONDARY FUEL WEIGHT                                      WDH1
C                                                                        WDH1
      WFU2(1)=0.0                                                        WDH1
      WOX2(1)=0.0                                                        WDH1
      IF (MR(5).EQ.0.0) GO TO 45                                         WDH1
      WFU2(1)=WWAIT(4)*(MR(5)-1.)/MR(5)*(   CFUEL(5))                    WDH1
      WFUEL(5)=WFU2(1)                                                   WDH1
C                                                                        WDH1
C     COMPUTE SECONDARY LOX WEIGHT                                       WDH1
C                                                                        WDH1
      WOX2(1)=WWAIT(4)*(MR(5)-1.)/MR(5)*(1.-CFUEL(5))                    WDH1
      WOX(5)=WOX2(1)                                                     WDH1
   45 CONTINUE                                                           WDH1
C                                                                        WDH1
C     COMPUTE TOTAL FUEL WEIGHT LESS TRAPPED AND LOSSES                  WDH1
C                                                                        WDH1
      WFUTOT=0.0                                                         WDH1
      IF (C(109).NE.1.0) WFUTOT=(WFUL+WFURES+C(110))/(1.-C(109))         WDH1
C                                                                        WDH1
C     COMPUTE TOTAL LOX WEIGHT LESS TRAPPED AND LOSSES                   WDH1
C                                                                        WDH1
      WOXTOT=0.0                                                         WDH1
      IF (C(111).NE.1.0) WOXTOT=(WOXID+WOXRES+C(112))/(1.-C(111))        WDH1
C                                                                        WDH1
C     SUM PROPELLANT WEIGHT LESS LOSSES AND TRAPPED                      WDH1
C                                                                        WDH1
      WP=WFUTOT+WOXTOT                                                   WDH1
C                                                                        WDH1
C     COMPUTE FUEL LOSSES                                                WDH1
C                                                                        WDH1
      WFULOS=C(123)*WFUTOT+C(229)*WP+C(124)                              WDH1
C                                                                        WDH1
C     COMPUTE LOX LOSSES                                                 WDH1
C                                                                        WDH1
      WOXLOS=C(125)*WOXTOT+C(230)*WP+C(126)                              WDH1
C                                                                        WDH1
C     SUM TOTAL FUEL WEIGHT AND LOSSES                                   WDH1
C                                                                        WDH1
      WFUTOT=WFUTOT+WFULOS                                               WDH1
C                                                                        WDH1
C     SUM TOTAL LOX  WEIGHT AND LOSSES                                   WDH1
C                                                                        WDH1
      WOXTOT=WOXTOT+WOXLOS                                               WDH1
C                                                                        WDH1
C     SUM PROPELLANT WEIGHT LESS TRAPPED                                 WDH1
C                                                                        WDH1
      WP=WFUTOT+WOXTOT                                                   WDH1
C                                                                        WDH1
C     COMPUTE TRAPPED FUEL WEIGHT                                        WDH1
C                                                                        WDH1
      WFUTRP=C(109)*WFUTOT+C(225)*WP+C(226)*TTOT  +C(110)                WDH1
C                                                                        WDH1
C     COMPUTE TRAPPED LOX WEIGHT                                         WDH1
C                                                                        WDH1
      WOXTRP=C(111)*WOXTOT+C(227)*WP+C(228)*TTOT  +C(112)                WDH1
C                                                                        WDH1
C     COMPUTE THRUST DECAY PROPELLANTS                                   WDH1
C                                                                        WDH1
      WDECAY=C(166)*TTOT+C(167)                                          WDH1
      WFDCAY=WDECAY*CFUEL(3)                                             WDH1
      WODCAY=WDECAY-WFDCAY                                               WDH1
C                                                                        WDH1
C     COMPUTE TOTAL FUEL WEIGHT                                          WDH1
C                                                                        WDH1
      WFUTOT=WFUTOT+WFUTRP+WFDCAY                                        WDH1
C                                                                        WDH1
C     COMPUTE TOTAL LOX WEIGHT                                           WDH1
C                                                                        WDH1
      WOXTOT=WOXTOT+WOXTRP+WODCAY                                        WDH1
C                                                                        WDH1
C     COMPUTE TANK PRESSURIZATION AND PURGE GASES                        WDH1
C                                                                        WDH1
      WGASPR=C(106)*VFUTK+C(107)*VOXTK+C(108)                            WDH1
C                                                                        WDH1
C     COMPUTE TRAPPED SERVICE ITEMS                                      WDH1
C                                                                        WDH1
      WSRTRP=C(113)*WWAIT(1)+C(114)                                      WDH1
C                                                                        WDH1
C     COMPUTE ICE AND FROST                                              WDH1
C                                                                        WDH1
      WFROST=C(78)                                                       WDH1
C                                                                        WDH1
C                                                                        JDA8
C     SUM ENTRY WEIGHT                                                   JDA8
C                                                                        JDA8
      WWAIT(6)=WWAIT(5)-WFUEL(5)-WOX(5)-WJET(5)                          JDA8
C                                                                        WDH5
C     COMPUTE AIR BREATHING FUEL                                         WDH1
C                                                                        WDH1
      WABFU=0.0                                                          WDH1
      WABFU=C(215)+C(214)/(1.+C(214))*WWAIT(6)                           JDA8
C                                                                        WDH5
C     COMPUTE AIR BREATHING FUEL TANK VOLUME                             WDH5
C                                                                        WDH5
      IF(RHOFU.EQ.0.0.OR.WWAIT(6).EQ.0.0)  GO TO 9999                    JDA8
      IF(C(212).NE.0.0.OR.C(213).NE.0.0) K(28)=WABFU/RHOFU               JDA8
 9999 CONTINUE                                                           JDA8
C                                                                        JDA8
C     SUM LANDING WEIGHT                                                 JDA8
C                                                                        JDA8
      WWAIT(7)=WWAIT(6)-WABFU                                            JDA8
C                                                                        WDH1
C     SUM SUBTOTAL                                                       WDH1
C                                                                        WDH1
      WTO=WWAIT(1)-WFUEL(1)-WOX(1)                                       WDH21
      WFUOX=WFUL+WOXID+WFU2(1)+WOX2(1)                                   WDH4
      WRESID=WFUTRP+WOXTRP+WGASPR+WSRTRP                                 WDH1
      WLOSS=WFULOS+WOXLOS+WACSFO+WPOWFO+WOIL+WABFU+WFROST                WDH1
C                                                                        WDH1
C     ******                                                             WDH1
C             GEOMETRY  SECTION                                          WDH1
C     *****                                                              WDH1
C                                                                        WDH1
C                                                                        WDH1
C     COMPUTE BODY VOLUME TO THE 1/3 POWER                               WDH1
C                                                                        WDH1
      IF(VBODY.LE.0.0) VBODY=1.0                                         WDH1
      VBODY1=VBODY**C13                                                  WDH1
C                                                                        WDH1
C     COMPUTE BODY VOLUME TO THE 2/3 POWER                               WDH1
C                                                                        WDH1
      VBODY2=VBODY1**2                                                   WDH1
C                                                                        WDH1
C     COMPUTE LOX TANK VOLUME                                            WDH1
C                                                                        WDH1
      VOXTK=0.0                                                          WDH1
      IF (RHOX.NE.0.) VOXTK=(WOXTOT/RHOX)*(K(2)+1.)+K(29)                WDH1
C                                                                        WDH1
C     COMPUTE FUEL TANK VOLUME                                           WDH1
C                                                                        WDH1
      VFUTK=0.0                                                          WDH1
      IF (RHOFU.NE.0.) VFUTK=(WFUTOT/RHOFU)*(K(1)+1.)+K(28)+K(21)        WDH1
C                                                                        WDH1
C     COMPUTE FUEL TANK SURFACE AREA                                     WDH1
C                                                                        WDH1
      SFUTK=0.0                                                          WDH1
      IF(VFUTK.GT.0.0)                                                   WDH1
     1SFUTK=CSFUTK*VFUTK**C23                                            WDH1
C                                                                        WDH1
C     COMPUTE LOX  TANK SURFACE AREA                                     WDH1
C                                                                        WDH1
      SOXTK=0.0                                                          WDH1
      IF(VOXTK.GT.0.0)                                                   WDH1
     1SOXTK=CSOXTK*VOXTK**C23                                            WDH1
C                                                                        WDH1
C     COMPUTE PROPELLANT TANKS INSULATION VOLUME                         WDH1
C                                                                        WDH1
      VINSTK=K(3)*SFUTK+K(4)+K(25)*SOXTK                                 WDH1
C                                                                        WDH1
C     COMPUTE SECONDARY FUEL TANK VOLUME                                 WDH1
C                                                                        WDH1
      VFUTK2=K(7)                                                        WDH1
      IF(RHOFU2.NE.0.0)                                                  WDH1
     1VFUTK2=WFU2(1)/RHOFU2                                              WDH1
C                                                                        WDH1
C     COMPUTE SECONDARY OXIDIZER TANK VOLUME                             WDH1
C                                                                        WDH1
      VOXTK2=K(8)                                                        WDH1
      IF(RHOX2.NE.0.0)                                                   WDH1
     1VOXTK2=WOX2(1)/RHOX2                                               WDH1
C                                                                        WDH1
C     COMPUTE PROPULSION  SYSTEM VOLUME                                  WDH1
C                                                                        WDH1
      VPROP=K(16)*TTOT+K(17)                                             WDH1
C                                                                        WDH1
C     COMPUTE CARGO VOLUME                                               WDH1
C                                                                        WDH1
      VCARGO=K(9)                                                        WDH1
C                                                                        WDH1
C     COMPUTE CREW VOLUME                                                WDH1
C                                                                        WDH1
      VCREW=K(5)*NCREW+K(6)                                              WDH1
C                                                                        WDH1
C     COMPUTE LANDING GEAR BAY VOLUME                                    WDH1
C                                                                        WDH1
      VLGBAY=K(12)*WLG+K(13)                                             WDH1
C                                                                        WDH1
C     COMPUTE VBODY,VOTHER,SBODY AND VSTRUC USING K(18) SCALING DATA     WDH5
C                                                                        WDH5
      IF(K(18).LE.1.0 ) GO TO 46                                         WDH21
      VBODY=K(18)*(VFUTK+VOXTK)+K(23)                                    WDH21
      VOTHER=VBODY-VFUTK-VOXTK-VINSTK-VCREW-VCARGO-VSTRUC-VLGBAY-VPROP   WDH21
     *-VFUTK2-VOXTK2                                                     WDH21
      SBODY=CSBODY*VBODY**C23                                            WDH21
      VSTRUC=K(10)*SBODY+K(11)                                           WDH21
      GO TO 60                                                           WDH21
   46 CONTINUE                                                           WDH21
C                                                                        WDH5
C     SAVE BODY VOLUME                                                   WDH1
C                                                                        WDH1
      VBODYX=VBODY                                                       WDH1
C                                                                        WDH1
C     SUB TOTAL BODY VOLUME -STRUCTURE-MISC.                             WDH1
C                                                                        WDH1
      VBODYA=VOXTK+VFUTK+VINSTK       +VPROP+VCARGO+VCREW+VLGBAY         WDH1
     1+VFUTK2+VOXTK2                                                     WDH1
C                                                                        WDH1
C     COMPUTE BODY SURFACE AREA                                          WDH1
C                                                                        WDH1
   50 SBODY=CSBODY*VBODY2                                                WDH1
C                                                                        WDH1
C     COMPUTE STRUCTURAL VOLUME                                          WDH1
C                                                                        WDH1
      VSTRUC=K(10)*SBODY+K(11)                                           WDH1
C                                                                        WDH1
C                                                                        WDH1
      VOTHER=K(18)*(VBODY-VCARGO-VSTRUC)+K(19)                           WDH1
C                                                                        WDH1
C     SUM BODY VOLUME                                                    WDH1
C                                                                        WDH1
      VBODY=VBODYA+VSTRUC+VOTHER                                         WDH1
C                                                                        WDH21
      IF(VBODY.LE.0.0) VBODY=1.0                                         WDH21
      IF(ABS(VBODYX-VBODY).LE.2.0) GO TO 60                              WDH21
C                                                                        WDH21
C     SAVE BODY VOLUME                                                   WDH21
C                                                                        WDH21
      VBODYX=VBODY                                                       WDH21
C                                                                        WDH21
C     UPDATE BODY VOLUME TO THE 2/3 POWER                                WDH21
C                                                                        WDH21
      IF(VBODY.LE.0.0) VBODY=1.0                                         WDH21
      VBODY2=VBODY**C23                                                  WDH21
C                                                                        WDH21
      GO TO 50                                                           WDH21
C                                                                        WDH1
C     UPDATE BODY VOLUME TO THE 1/3 POWER                                WDH1
C                                                                        WDH1
   60 VBODY1=VBODY**C13                                                  WDH1
C                                                                        WDH1
C     UPDATE BODY VOLUME TO THE 2/3 POWER                                WDH1
C                                                                        WDH1
      VBODY2=VBODY1**2                                                   WDH1
C                                                                        WDH1
      IF(NWL.LE.0.OR.NWL.GE.8) NWL=6                                     WDH1
C                                                                        WDH1
C     TEST FOR WING SIZE METHOD-IF INPUT WING LOADING (FXWOVS) NOT EQUAL WDH1
C     TO ZERO SIZE ON INPUT -IF INPUT  WING LOADING EQUAL ZERO USE INPUT WDH1
C     WING AREA                                                          WDH1
C                                                                        WDH1
      IF(FXWOVS.NE.0.0) GO TO 70                                         WDH1
C                                                                        WDH1
C     VARIABLE WING LOADING                                              WDH1
C                                                                        WDH1
      WOVERS=0.0                                                         WDH1
      IF (SWING.NE.0.0) WOVERS=WWAIT(NWL)/SWING                          WDH1
C                                                                        WDH1
      GO TO 80                                                           WDH1
C                                                                        WDH1
C     FIXED WING LOADING                                                 WDH1
C                                                                        WDH1
   70 SWING=WWAIT(NWL)/FXWOVS                                            WDH1
      WOVERS=FXWOVS                                                      WDH1
C                                                                        WDH1
C     COMPUTE AERO WING SPAN                                             WDH1
C                                                                        WDH1
   80 GSPAN=0.0                                                          WDH1
      IF((ASRATO*SWING).GT.0.0)                                          WDH1
     1GSPAN=(ASRATO*SWING)**.5                                           WDH1
C                                                                        WDH1
C     COMPUTE WING ROOT CHORD                                            WDH1
C                                                                        WDH1
      CROOT=0.0                                                          WDH1
      IF (TPRATO.NE.-1.0) CROOT=2.*SWING/((1.+TPRATO)*GSPAN)             WDH1
C                                                                        WDH1
C     COMPUTE WING TIP  CHORD                                            WDH1
C                                                                        WDH1
      CTIP=CROOT*TPRATO                                                  WDH1
C                                                                        WDH1
C     COMPUTE WING STRUCTURAL SPAN 50PC                                  WDH1
C                                                                        WDH1
      CSPAN=0.0                                                          WDH1
      IF (GSPAN.NE.0.0)  CSPAN=GSPAN/COS(ATAN(TAN(ASWEEP/RTOD)-(.5*CROOT WDH1
     1*(1.+TPRATO)/(GSPAN/2.))))                                         WDH1
C                                                                        WDH1
C     COMPUTE WING THICKNESS AT ROOT                                     WDH1
C                                                                        WDH1
      TROOT=TOVERC*CROOT                                                 WDH1
C                                                                        WDH1
C     COMPUTE BODY WIDTH                                                 WDH1
C                                                                        WDH1
      BBODY=CBBODY*VBODY1                                                WDH1
C                                                                        WDH1
C     COMPUTE WING EXPOSED AREA                                          WDH1
C                                                                        WDH1
      SXPOS=0.0                                                          WDH1
      IF((.5*BBODY).GT.0.0)                                              WDH1
     1SXPOS =SWING-(CROOT*BBODY-(.5*BBODY)**2*TAN(ASWEEP/RTOD))          WDH1
C                                                                        WDH1
C     COMPUTE HORIZONTAL TAIL AREA                                       WDH1
C                                                                        WDH1
      SHORZ=CSHORZ*SWING                                                 WDH1
C                                                                        WDH1
C     COMPUTE BODY SURFACE AREA                                          WDH1
C                                                                        WDH1
      SBODY=CSBODY*VBODY2                                                WDH1
C                                                                        WDH1
C     COMPUTE VERTICAL TAIL AREA                                         WDH1
C                                                                        WDH1
      SVERT=CSVERT*VBODY2                                                WDH1
C                                                                        WDH1
C     COMPUTE FAIRING AREA                                               WDH1
C                                                                        WDH1
      SFAIR=CSFAIR*SBODY                                                 WDH1
C                                                                        WDH1
C     PLANFORM AREA                                                      WDH1
C                                                                        WDH1
      SPLAN=CSPLAN*VBODY2                                                WDH1
C                                                                        WDH1
C     COMPUTE BODY HEIGHT                                                WDH1
C                                                                        WDH1
      HBODY=CHBODY*VBODY1                                                WDH1
C                                                                        WDH1
C     COMPUTE BODY LENGTH                                                WDH1
C                                                                        WDH1
      LBODY=CLBODY*VBODY1                                                WDH1
C                                                                        WDH1
C                                                                        WDH1
C     COMPUTE THERMAL PROTECTION AREA                                    WDH1
C                                                                        WDH1
      IF(ITPS.LT.1.OR.ITPS.GT.8) ITPS=1                                  WDH1
      GO TO (90,100,110,120,130,140,150,160), ITPS                       WDH1
   90 STPS(1)=0.                                                         WDH1
      GO TO 170                                                          WDH1
  100 STPS(1)=SBODY                                                      WDH1
      GO TO 170                                                          WDH1
  110 STPS(1)=SBODY+SHORZ                                                WDH1
      GO TO 170                                                          WDH1
  120 STPS(1)=SBODY+SHORZ+SVERT                                          WDH1
      GO TO 170                                                          WDH1
  130 STPS(1)=SBODY+SHORZ+SVERT+SWING                                    WDH1
      GO TO 170                                                          WDH1
  140 STPS(1)=SHORZ+SVERT+SWING                                          WDH1
      GO TO 170                                                          WDH1
  150 STPS(1)=SBODY+SWING                                                WDH1
      GO TO 170                                                          WDH1
  160 STPS(1)=SBODY+SVERT                                                WDH1
C                                                                        WDH1
  170 CONTINUE                                                           WDH1
C                                                                        WDH1
C     **********                                                         WDH1
C     WEIGHTS                                                            WDH1
C     **********                                                         WDH1
C                                                                        WDH1
C                                                                        WDH1
C     COMPUTE WING WEIGHT                                                WDH1
C                                                                        WDH1
      WWING=0.0                                                          WDH1
      IF (TROOT.NE.0.0) WWING=C(1)*(WWAIT(6)* LF* CSPAN*SWING/TROOT      WDH1
     1/10.**9)**C(12)+C(2)*SWING+C(3)                                    WDH4
C                                                                        WDH1
C     COMPUTE VERTICAL TAIL WEIGHT                                       WDH1
C                                                                        WDH1
      WVERT=0.0                                                          WDH1
      IF(SVERT.GT.0.0.AND.C(135).GT.0.0)                                 WDH1
     1WVERT=C(4)*SVERT**C(135)+C(24)*SVERT+C(5)                          WDH4
C                                                                        WDH1
C     COMPUTE HORIZONTAL TAIL WEIGHT                                     WDH1
C                                                                        WDH1
      WHORZ=0.0                                                          WDH1
      IF(WOVERS.GT.0.0.AND.SHORZ.GT.0.0.AND.Q.GT.0.0.AND.C(176).GT.0.0)  WDH1
     1WHORZ=C(6)*( WOVERS**1.21*SHORZ**.814*Q**.467)**C(176)+C(25)*SHORZ WDH4
     2+C(7)                                                              WDH4
C                                                                        WDH1
C     COMPUTE FAIRING WEIGHT                                             WDH1
C                                                                        WDH1
      WFAIR=C(8)*SFAIR+C(9)                                              WDH1
C                                                                        WDH1
C     SUM AERO SURFACES                                                  WDH1
C                                                                        WDH1
      WSURF=WWING+WVERT+WHORZ+WFAIR                                      WDH1
C                                                                        WDH1
C     COMPUTE INTEGRAL FUEL TANK WEIGHT                                  WDH1
C                                                                        WDH1
      WINFUT=C(10)*VFUTK+C(11)                                           WDH1
C                                                                        WDH1
C     COMPUTE INTEGRAL LOX  TANK WEIGHT                                  WDH1
C                                                                        WDH1
      WINOXT=C(138)*VOXTK+C(139)                                         WDH1
C                                                                        WDH1
C     COMPUTE BODY BASIC STRUCTURE WEIGHT                                WDH1
C                                                                        WDH1
      WBASIC=C(13)*SBODY+C(14)*VBODY+C(15)                               WDH1
C                                                                        WDH1
C     COMPUTE BODY SECONDARY STRUCTURE WEIGHT                            WDH1
C                                                                        WDH1
      WSECST=C(23)*SBODY+C(169)                                          WDH1
C                                                                        WDH1
C     COMPUTE THRUST STRUCTURE WEIGHT                                    WDH1
C                                                                        WDH1
      WTHRST=C(168)*TTOT+C(163)                                          WDH1
C                                                                        WDH1
C     SUM BODY WEIGHT                                                    WDH1
C                                                                        WDH1
      WBODY=WINFUT+WINOXT+WBASIC+WSECST+WTHRST                           WDH1
C                                                                        WDH1
C     COMPUTE TPS INSULATION WEIGHT                                      WDH1
C                                                                        WDH1
      WINSUL=C(180)*STPS(1)+C(26)                                        WDH1
C                                                                        WDH1
C     COMPUTE TPS COVER PANELS WEIGHT                                    WDH1
C                                                                        WDH1
      WCOVER=C(181)*STPS(1)+C(27)                                        WDH1
C                                                                        WDH1
C     SUM TPS WEIGHT                                                     WDH1
C                                                                        WDH1
      WTPS=WINSUL+WCOVER                                                 WDH1
C                                                                        WDH1
C     COMPUTE LAUNCH EQUIPMENT WEIGHT                                    WDH1
C                                                                        WDH1
      WLANCH=C(143)*WTO+C(144)                                           WDH1
C                                                                        WDH1
C     COMPUTE LANDING GEAR WEIGHT                                        WDH1
C                                                                        WDH1
      WLG=0.0                                                            WDH1
      IF(WGROSS.GT.0.0.AND.C(182).GT.0.0)                                WDH1
     1WLG=C(30)*WWAIT(7)**C(182)+C(31)                                   WDH4
C                                                                        WDH1
C     COMPUTE DOCKING EQUIPMENT                                          WDH1
C                                                                        WDH1
      WDOCK=C(147)*WWAIT(5)+C(148)                                       WDH1
C                                                                        WDH1
C     COMPUTE DEPLOYABLE AREO DEVICES                                    WDH1
C                                                                        WDH1
      WDPLOY=C(145)*WWAIT(7)+C(146)                                      WDH1
C                                                                        WDH1
C     SUM LAUNCH AND RECOVERY GEAR                                       WDH1
C                                                                        WDH1
      WLRD=WLANCH+WLG+WDOCK+WDPLOY                                       WDH1
C                                                                        WDH1
C     COMPUTE CREW WEIGHT                                                WDH1
C                                                                        WDH1
      WPERS=C(97)*NCREW+C(98)                                            WDH1
C                                                                        WDH1
C     COMPUTE ENGINE MOUNT WEIGHT                                        WDH1
C                                                                        WDH1
      WENGMT=C(183)*TTOT+C(184)                                          WDH1
C                                                                        WDH1
C     COMPUTE GIMBAL TORQUE                                              WDH1
C                                                                        WDH1
      TDEL=0.0                                                           WDH1
      IF(NENGS.NE.0.0.AND.PCHAM.NE.0.0) TDEL=750.*(TTOT/NENGS/PCHAM)**   WDH1
     1 1.25                                                              WDH1
C                                                                        WDH1
C     COMPUTE GIMBAL SYSTEM WEIGHT                                       WDH1
C                                                                        WDH1
      WSTAB=0.0                                                          WDH1
      IF(TDEL.GT.0.0.AND.C(160).GT.0.0)                                  WDH1
     1WSTAB=NENGS*(C(28)*TDEL**C(160))+C(161)                            WDH4
C                                                                        WDH1
C     COMPUTE SECONDARY ROCKET ENGINE WEIGHT                             WDH1
C                                                                        WDH1
      WENGS2=C(140)*TTOT2+C(141)                                         WDH1
C                                                                        WDH1
C     COMPUTE AIR BREATHING ENGINE WEIGHT                                WDH1
C                                                                        WDH1
      WABPR=C(210)*WWAIT(6)+C(211)
C                                                                        WDH1
C     COMPUTE AIR BREATHING NACELLES WEIGHT                              WDH1
C                                                                        WDH1
      WNACEL=C(36)*WABPR+C(37)                                           WDH1
C                                                                        WDH1
C     TEST-FOR AIR BREATHING FUEL TYPE IF LH2 GO AROUND                  WDH1
C       JP-4 SYSTEM WEIGHT EQUATION                                      WDH1
C                                                                        WDH1
      WBPUMP=0.0                                                         WDH1
      WPRSYS=0.0                                                         WDH1
      WDIST1=0.0                                                         WDH1
      IF (C(212).NE.0.0.OR.C(213).NE.0.0) GO TO 180                      WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL PUMPS WEIGHT                                     WDH1
C                                                                        WDH1
      WBPUMP= C(149)*ANENGS*(1.75+.266*ANENGS)/1000.                     WDH1
C                                                                        WDH1
C     COMPUTE JP-4 PRESSURE SYSTEM WEIGHT                                WDH1
C                                                                        WDH1
      WABFPS=0.0009*C(149)*ANENGS*ANTANK                                 WDH4
C                                                                        WDH1
C     COMPUTE JP-4 FUEL DISTRIBUTION SYSTEM WEIGHT                       WDH1
C                                                                        WDH1
      WDIST1=ANENGS*C(191)*SQRT(C(149))                                  WDH1
C                                                                        WDH1
  180 CONTINUE                                                           WDH1
C                                                                        WDH1
C     COMPUTE ROCKET ENGINE WEIGHT                                       WDH1
C                                                                        WDH1
      WENGS=0.0                                                          WDH1
      IF(C(221).GT.0.0)                                                  WDH1
     1WENGS=C(32)*TTOT+C(219)*TTOT*C(220)**C(221)+C(33)*NENGS+WENGMT     WDH1
C                                                                        WDH1
C     COMPUTE ROCKET FUEL TANK WEIGHT NON-STRUCTURAL                     WDH1
C                                                                        WDH1
      WFUTK=C(39)*VFUTK+C(40)                                            WDH1
C                                                                        WDH1
C     COMPUTE ROCKET LOX  TANK WEIGHT NON-STRUCTURAL                     WDH1
C                                                                        WDH1
      WOXTK=C(41)*VOXTK+C(42)                                            WDH1
C                                                                        WDH1
C     COMPUTE ROCKET SECONDARY FUEL TANK WEIGHT                          WDH1
C                                                                        WDH1
      WFUTK2=C(170)*VFUTK2+C(136)                                        WDH1
C                                                                        WDH1
C     COMPUTE ROCKET SECONDARY LOX  TANK WEIGHT                          WDH1
C                                                                        WDH1
      WOXTK2=C(171)*VOXTK2+C(137)                                        WDH1
C                                                                        WDH1
C     COMPUTE ROCKET PROPELLANT TANK INSULATION WEIGHT                   WDH1
C                                                                        WDH1
      WINSTK=C(43)*SFUTK+C(77)*SOXTK+C(44)                               WDH1
C                                                                        WDH1
C     COMPUTE ROCKET FUEL SYSTEM WEIGHT                                  WDH1
C                                                                        WDH1
      WFUSYS=C(45)*TTOT+C(46)*LBODY+C(47)                                WDH1
C                                                                        WDH1
C     COMPUTE ROCKET LOX  SYSTEM WEIGHT                                  WDH1
C                                                                        WDH1
      WOXSYS=C(48)*TTOT+C(49)*LBODY+C(50)                                WDH1
C                                                                        WDH1
C     COMPUTE ROCKET PRESSURE SYSTEM WEIGHT                              WDH1
C                                                                        WDH1
      WPRSYS=C(51)*VFUTK+C(52)*VOXTK+C(187)                              WDH1
C                                                                        WDH1
C     TEST-FOR AIR BREATHING FUEL TYPE IF LH2 GO AROUND                  WDH1
C       JP-4 SYSTEM WEIGHT EQUATION                                      WDH1
C                                                                        WDH1
      GAL=0.0                                                            WDH1
      WFUNCT=0.0                                                         WDH1
      WDIST2=0.0                                                         WDH1
      WFCONT=0.0                                                         WDH1
      WREFUL=0.0                                                         WDH1
      WDRANS=0.0                                                         WDH1
      WSEAL=0.0                                                          WDH1
      ABFSYS=0.0                                                         WDH1
      WABFS = 0.                                                         WDH4
      IF (C(212).NE.0.0.OR.C(213).NE.0.0) GO TO 190                      WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL IN GALLONS                                       WDH1
C                                                                        WDH1
      GAL=WABFU/6.5                                                      WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL SYSTEM TANKS WEIGHT                              WDH1
C                                                                        WDH1
      IF(ANTANK.NE.0.0) WFUNCT=C(189)*(GAL/ANTANK)**.6*ANTANK+C(190)     WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL SYSTEM DISTRIBUTION WEIGHT                       WDH1
C                                                                        WDH1
      WDIST2=.255*GAL**.7*ANTANK**.25                                    WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL SYSTEM CONTROLS WEIGHT                           WDH1
C                                                                        WDH1
      WFCONT=.169*ANTANK*SQRT(GAL)                                       WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL SYSTEM REFUEL SYSTEM WEIGHT                      WDH1
C                                                                        WDH1
      WREFUL=ANTANK*(3.+.45*GAL**C13)                                    WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL SYSTEM REFUEL SYSTEM WEIGH                       WDH1
C                                                                        WDH1
      WDRANS=.159*GAL**.65                                               WDH1
C                                                                        WDH1
C     COMPUTE JP-4 FUEL TANK SEALING                                     WDH1
C                                                                        WDH1
      IF(ANTANK.NE.0.0) WSEAL=.045*ANTANK*(GAL/ANTANK)**.75              WDH1
C                                                                        WDH1
C     SUM JP-4 FUEL SYSTEM WEIGHT                                        WDH1
C                                                                        WDH1
      ABFSYS=WBPUMP+WDIST1+WDIST2+WFCONT+WREFUL+WDRANS+WSEAL+WFUNCT      WDH1
     1+WABFPS                                                            WDH4
C                                                                        WDH4
C     SUM JP FUEL SYSTEM WEIGHT LESS TANKS                               WDH4
C                                                                        WDH4
      WABFS=ABFSYS-WFUNCT                                                WDH4
C                                                                        WDH1
  190 CONTINUE                                                           WDH1
C                                                                        WDH1
C     COMPUTE AIRFUEL TANK WEIGHT                                        WDH1
C                                                                        WDH1
      WABFTK=C(212)*WABFU+C(213) +ABFSYS                                 WDH1
C                                                                        WDH1
C     SUM PROPULSION SYSTEM WEIGHT                                       WDH1
C                                                                        WDH1
      WPROP=WENGS+WNACEL+WFUTK+WOXTK+WINSTK+WFUSYS+WOXSYS+WPRSYS+WENGS2+ WDH1
     1WFUTK2+WOXTK2+WABPR+WABFTK                                         WDH1
C                                                                        WDH1
C     COMPUTE AREO SURFACE CONTROL WEIGHT                                WDH1
C                                                                        WDH1
      WAERO=0.0                                                          WDH1
      IF(WWAIT(5).GT.0.0.AND.(LBODY+CSPAN).GT.0.0.AND.C(185).GT.0.0)
     1WAERO=C(55)*(WWAIT(5)**.689*(LBODY+CSPAN)**.287)**C(185)+C(56)
C                                                                        WDH1
C     COMPUTE SEPARATION SYSTEM WEIGHT                                   WDH1
C                                                                        WDH1
      IF(JUMP.EQ.0.0) WAUXT=C(153)*WTO+C(154)
      IF(JUMP.EQ.1.0) WAUXT=C(153)*WPAYL+C(154)
C                                                                        WDH1
C     COMPUTE ACS SYSTEM WEIGHT                                          WDH1
C                                                                        WDH1
      WACS=0.0                                                           WDH1
      IF(WTO.GT.0.0.AND.C(155).GT.0.0)                                   WDH1
     1WACS=C(156)*WWAIT(4)**C(155)+C(157)                                WDH4
C                                                                        WDH1
C     COMPUTE ACS PROPELLANT TANK WEIGHT                                 WDH1
C                                                                        WDH1
      WACSTK=C(164)*(WACSFO+WACRES)+C(165)                               WDH1
C                                                                        WDH1
C     SUM ORIENTATION CONTROLS WEIGHT                                    WDH1
C                                                                        WDH1
      WORSUL=WSTAB+WACS+WAERO+WAUXT+WACSTK                               WDH1
C                                                                        WDH1
C     COMPUTE GUIDANCE AND NAVIGATION SYSTEM WEIGHT                      WDH1
C                                                                        WDH1
      WGNAV=C(68)                                                        WDH1
C                                                                        WDH1
C     COMPUTE INSTRUMENTATION SYSTEM WEIGHT                              WDH1
C                                                                        WDH1
      WINST =C(69)*LBODY+C(70)                                           WDH1
C                                                                        WDH1
C     COMPUTE COMMUNICATION SYSTEM WEIGHT                                WDH1
C                                                                        WDH1
      WCOMM=C(71)*NCREW+C(72)                                            WDH1
C                                                                        WDH4
C     SUM AVIONICS SYSTEM                                                WDH4
C                                                                        WDH4
      WAVIOC=WGNAV+WINST +WCOMM                                          WDH4
C                                                                        WDH1
C     COMPUTE PRIME POWER SOURCE AND DISTRIBUTION                        WDH4
C                                                                        WDH1
      WSORCE=0.0                                                         WDH4
      IF(WAVIOC.GT.0.0)                                                  WDH4
     1WSORCE=C(62)*(WAVIOC+WABFS)**C(63)+C(64)                           WDH4
C                                                                        WDH1
C     COMPUTE PRIME POWER SOURCE TANKAGE                                 WDH1
C                                                                        WDH1
      WPOWTK=C(29)*WPOWFO+C(60)                                          WDH1
C                                                                        WDH4
C     SUM ELECTRICAL POWER SYSTEMS                                       WDH4
C                                                                        WDH4
      WPOWER=WSORCE+WPOWTK                                               WDH1
C                                                                        WDH1
C     COMPUTE HYDRAULIC/PNEUMATIC SYSTEM                                 WDH4
C                                                                        WDH1
      WHYCAD=0.0                                                         WDH1
      IF(((SWING+SHORZ+SVERT)*Q/1000.).GT.0.0.AND.(LBODY+CSPAN).GT.0.0)  WDH5
     1WHYCAD=C(65)*(((SWING+SHORZ+SVERT)*Q/1000.)**1.3125+(LBODY+CSPAN)  WDH5
     2**1.06125)**C(66)+C(67)                                            WDH5
C                                                                        WDH1
C     SUM POWER CONTROL AND DISTRIBUTION                                 WDH1
C                                                                        WDH1
      WPOWCD=WHYCAD                                                      WDH4
C                                                                        WDH1
C     COMPUTE PERSONNEL ACCOMODATIONS WEIGHT                             WDH1
C                                                                        WDH1
      WPPROV=C(74)*WWAIT(7)+C(75)*NCREW+C(76)                            WDH1
C                                                                        WDH1
C     COMPUTE DRY WEIGHT                                                 WDH1
C                                                                        WDH1
      WDRY=WSURF+WBODY+WTPS+WLRD+WPROP+WORSUL+WPOWCD+WGNAV+WINST +WCOMM+ WDH1
     1WPPROV +WPOWER                                                     WDH1
C                                                                        WDH1
C     COMPUTE GROWTH AND CONTINGENCY                                     WDH1
C                                                                        WDH1
      WCONT=C(96)*WDRY+C(162)                                            WDH1
C                                                                        WDH1
C     SUM WEIGHT WEIGHT EMPTY                                            WDH1
C                                                                        WDH1
      WEMPTY=WDRY+WCONT                                                  WDH1
C                                                                        WDH1
C     COMPUTE CARGO WEIGHT                                               WDH1
C                                                                        WDH1
      WCARGO=C(102)*NPASS+C(103)                                         WDH1
C                                                                        WDH1
C     COMPUTE PASSENGER WEIGHT                                           WDH1
C                                                                        WDH1
      WPASS=C(104)*NPASS+C(105)                                          WDH1
C                                                                        WDH1
C     SUM PAYLOAD WEIGHT                                                 WDH1
C                                                                        WDH1
      WPAYL=WPASS+WCARGO                                                 WDH1
C                                                                        WDH1
C     SUM OPERATING WEIGHT EMPTY                                         WDH1
C                                                                        WDH1
      WWET  =WEMPTY+WRESID+WPERS+WPAYL+WRESRV                            WDH1
C                                                                        WDH1
C     SUM ZERO FUEL WEIGHT                                               WDH1
C                                                                        WDH1
      WZROFU=   WWET+      WFULOS+WOXLOS                                 WDH1
     1                          +WACSFO      +WPOWFO+WOIL+WABFU+WFROST   WDH1
C                                                                        WDH1
C     SUM TAKEOFF WEIGHT                                                 WDH1
C                                                                        WDH1
      WTO=WZROFU+WFUOX+WDECAY-WFUEL(1)-WOX(1)                            WDH4
C                                                                        WDH1
C     SUM GROSS WEIGHT                                                   WDH1
C                                                                        WDH1
      WGROSS=WTO+WPREIG+WFUEL(1)+WOX(1)                                  WDH21
C                                                                        WDH1
C     UPDATE WWAIT(1)                                                    WDH1
C                                                                        WDH1
      WWAIT(1)=WGROSS -WPREIG                                            WDH1
C                                                                        WDH1
C     GROSS WEIGHT LESS PAYLOAD                                          WDH1
C                                                                        WDH1
      WTABC=WGROSS-WPAYL                                                 WDH1
C                                                                        WDH1
C                                                                        WDH1
C     MISCELLANEOUS CONTROL STATEMENTS                                   WDH1
C                                                                        WDH1
C                                                                        WDH1
      IF(NLISTO.NE.0) WRITE(6,MASS1)                                     WDH1
      IF(NLISTO.NE.0) WRITE(6,MASS2)                                     WDH1
C                                                                        WDH5
      IF (WGROSS.GT.20000000..AND.JUMP.EQ.1.OR.WGROSS.GT.10000000..AND.J WDH1
     1UMP.EQ.0) GO TO 210                                                WDH1
C                                                                        WDH1
      RETURN                                                             WDH1
C                                                                        WDH1
  210 WRITE(6,MASS1)                                                     WDH4
      WRITE(6,MASS2)                                                     WDH4
C                                                                        WDH5
      CALL EXIT                                                          WDH1
C                                                                        WDH1
      END                                                                WDH1
  ELT PRINTW,1,710302, 33742
  EOF "                                                                        "
      SUBROUTINE PRINTW                                                  PRINTW
C ***  PRINTW  ***                                                       PRINTW
C                                                                        PRINTW
C   PRINTW - PRINTS WEIGHTS                                              PRINTW
C                                                                        PRINTW
      REAL NENGS
      REAL KWSTAB                                                        PRINTW
      REAL ISP,K,LF,MR,NCREW,LBODY,NPASS                                 WDH3
      REAL KWABPR,KWABFT,KWABFU                                          PRINTW
     *,KILO ,KWSURF,KWWING,KWVERT,KWHORZ,KWFAIR,KWBODY,KWINFU,KWBASI,    PRINTW
     1KWSECS,KWTPS ,KWCOVE,KWINSU,KWLG  ,KWPROP,KWENGS,KWNACE,KWFUTK,    WDH3
     2KWOXTK,KWINST,KWFUSY,KWOXSY,KWPRSY,KWAERO,KWPOWE,KWAPU ,KWPOWT,    WDH3
     3KWELCA,KWHYCA,KWGNAV,KWPPRO,KWDRY ,KWCONT,KWPERS,KWPAYL,KWCARG,    WDH3
     4KWPASS,KWRESI,KWGASP,KWFUTR,KWOXTR,KWSRTR,KWRESR,KWFURE,           WDH3
     *KWOXRE,KWPOWR,KWOILR,KWACRE,       KWWET ,KWLOSS,KWFULO,KWOXLO,    PRINTW
     *KWPOWF,KWOIL ,KWDECA,KWFUOX,KWFUL ,KWPREI,KWGROS                   PRINTW
     *,KFUTK2,KOXTK2                                                     PRINTW
      REAL  KWLRD,KWLANC,KWDPLO,KWDOCK,KWORSU,KWAUXT,KWACS               WDH3
     *,KWACSF,KWSORC,KWINS1,KWFU2,KWOX2                                  PRINTW
     1,KWINOX,KWTHRS,KWENG2,KWPOWC,KWTO,KWOXID,KWACST,KWBOO              WDH3
      COMMON / JUMPY / JUMP, WBIG, WBOO                                  PRINTW
      COMMON/CINPUT/                                                     WDH3
     1ANENGS  ,ANTANK  ,ASRATO  ,ASWEEP  ,C(300)  ,CBBODY  ,CFUEL(6),    WDH3
     2CHBODY  ,CLBODY  ,CSBODY  ,CSFAIR  ,CSFUTK  ,CSHORZ  ,CSOXTK  ,    WDH3
     3CSPLAN  ,CSVERT  ,CSWING  ,CTHRST  ,CTHST2  ,DEF(5)  ,FXWOVS  ,    WDH3
     4ISP(6)  ,ITPS    ,K(30)   ,KIN     ,LF      ,MR(6)   ,NCREW   ,    WDH3
     5NENGS   ,NLISTO  ,NPASS   ,NWL     ,PCHAM   ,Q       ,RHOFU   ,    WDH3
     6RHOFU2  ,RHOX    ,RHOX2   ,SBODY   ,TOL     ,TOVERC  ,TPRATO  ,    WDH3
     7TYTAIL  ,VBODY   ,WGROSS                                           WDH3
      COMMON/VOLCAL/BBODY,CROOT ,CSPAN   ,CTIP    ,GAL     ,GSPAN   ,    WDH3
     2HBODY   ,LBODY   ,RTOD    ,SFAIR   ,SFUTK   ,SHORZ   ,SOXTK   ,    WDH3
     3SPLAN   ,STPS(1) ,SVERT   ,SWING   ,SXPOS   ,TDEL    ,TROOT   ,    WDH3
     4TTOT    ,TTOT2   ,TTOTAL  ,VBODYA  ,VBODY1  ,VBODY2  ,VCARGO  ,    WDH3
     5VCREW   ,VFUTK   ,VFUTK2  ,VINSTK  ,VLGBAY  ,VOTHER  ,VOXTK   ,    WDH3
     6VOXTK2  ,VPROP   ,VSTRUC                                           WDH3
      COMMON/WTCALC/    ABFSYS  ,WABFTK  ,WABFU   ,WABPR   ,WACRES  ,    WDH3
     1WACS    ,WACSFO  ,WACSTK  ,WAERO   ,WAUXT   ,WBASIC  ,WBODY   ,    WDH3
     2WBPUMP  ,WCARGO  ,WCOMM   ,WCONT   ,WCOVER  ,WDECAY  ,WDIST1  ,    WDH3
     3WDIST2  ,WDOCK   ,WDPLOY  ,WDRANS  ,WDRY    ,WELCAD  ,WEMPTY  ,    WDH3
     4WENGMT  ,WENGS   ,WENGS2  ,WFAIR   ,WFCONT  ,WFDCAY  ,WFROST  ,    WDH3
     5WFU2(3) ,WFUEL(6),WFUL    ,WFULOS  ,WFUNCT  ,WFUOX   ,WFURES  ,    WDH3
     6WFUSYS  ,WFUTK   ,WFUTK2  ,WFUTOT  ,WFUTRP  ,WGASPR  ,WGNAV   ,    WDH3
     7WHORZ   ,WHYCAD  ,WINFUT  ,WINOXT  ,WINSTK  ,WINST   ,WINSUL  ,    WDH3
     8WJET(6) ,WLANCH  ,WLG     ,WLOSS   ,WLRD    ,WNACEL  ,WODCAY  ,    WDH3
     9WOIL    ,WOILRS  ,WORSUL  ,WOVERS  ,WOX(6)  ,WOX2(3) ,WOXID   ,    WDH3
     1WOXLOS  ,WOXRES  ,WOXSYS  ,WOXTK   ,WOXTK2  ,WOXTOT  ,WOXTRP  ,    WDH3
     2WP      ,WPASS   ,WPAYL   ,WPERS   ,WPOWCD  ,WPOWER  ,WPOWFO  ,    WDH3
     3WPOWRS  ,WPOWTK  ,WPPROV  ,WPREIG  ,WPROP   ,WPRSYS  ,WREFUL  ,    WDH3
     4WRESID  ,WRESRV  ,WSEAL   ,WSECST  ,WSORCE  ,WSRTRP  ,WSTAB   ,    WDH3
     5WSURF   ,WTABC   ,WTHRST  ,WTO     ,WTPS    ,WVERT   ,WWAIT(10),   WDH3
     6WWET    ,WWING   ,WZROFU                                           WDH3
      KILO = 0.4535924                                                   PRINTW
      KWABPR = WABPR * KILO                                              PRINTW
      KWABFT = WABFTK * KILO                                             PRINTW
      KWABFU = WABFU * KILO                                              PRINTW
      KWSTAB=KILO*WSTAB                                                  PRINTW
      KWSURF = KILO*WSURF                                                PRINTW
      KWWING = KILO*WWING                                                PRINTW
      KWVERT = KILO*WVERT                                                PRINTW
      KWHORZ = KILO*WHORZ                                                PRINTW
      KWFAIR = KILO*WFAIR                                                PRINTW
      KWACSF = KILO*WACSFO                                               PRINTW
      KWBODY = KILO*WBODY                                                PRINTW
      KWBASI = KILO*WBASIC                                               PRINTW
      KWSECS = KILO*WSECST                                               PRINTW
      KWTPS  = KILO*WTPS                                                 PRINTW
      KWCOVE = KILO*WCOVER                                               PRINTW
      KWDPLO=KILO*WDPLOY                                                 PRINTW
      KWINSU = KILO*WINSUL                                               PRINTW
      KWDOCK = KILO * WDOCK                                              PRINTW
      KWLG   = KILO*WLG                                                  PRINTW
      KWPROP = KILO*WPROP                                                PRINTW
      KWGROS = KILO*WGROSS                                               PRINTW
      KWTO   = KILO* WTO                                                 PRINTW
      KWENGS = KILO*WENGS                                                PRINTW
      KWNACE = KILO*WNACEL                                               PRINTW
      KWFUTK = KILO*WFUTK                                                PRINTW
      KWOXTK = KILO*WOXTK                                                PRINTW
      KWINST = KILO*WINSTK                                               PRINTW
      KWFUSY = KILO*WFUSYS                                               PRINTW
      KWOXSY = KILO*WOXSYS                                               PRINTW
      KWACS = KILO*WACS                                                  PRINTW
      KWAUXT = KILO* WAUXT                                               PRINTW
      KWPRSY = KILO*WPRSYS                                               PRINTW
      KWSORC = KILO*WSORCE                                               PRINTW
      KWAERO = KILO*WAERO                                                PRINTW
      KWPOWE = KILO*WPOWER                                               PRINTW
      KWPOWT = KILO*WPOWTK                                               PRINTW
      KWELCA = KILO*WELCAD                                               PRINTW
      KWHYCA = KILO*WHYCAD                                               PRINTW
      KWGNAV = KILO*WGNAV                                                PRINTW
      KWINS1 = KILO*WINST                                                PRINTW
      KWCOMM = KILO*WCOMM                                                PRINTW
      KWPPRO = KILO*WPPROV                                               PRINTW
      KWLRD = KILO*WLRD                                                  PRINTW
      KWLANC = KILO*WLANCH                                               PRINTW
      KWDRY  = KILO*WDRY                                                 PRINTW
      KWCONT = KILO*WCONT                                                PRINTW
      KWPERS = KILO* WPERS                                               PRINTW
      KWPAYL = KILO*WPAYL                                                PRINTW
      KWCARG = KILO*WCARGO                                               PRINTW
      KWPASS = KILO*WPASS                                                PRINTW
      KWRESI = KILO*WRESID                                               PRINTW
      KWGASP = KILO*WGASPR                                               PRINTW
      KWFUTR = KILO*WFUTRP                                               PRINTW
      KWOXTR = KILO*WOXTRP                                               PRINTW
      KWSRTR = KILO*WSRTRP                                               PRINTW
      KWRESR = KILO*WRESRV                                               PRINTW
      KWFURE = KILO*WFURES                                               PRINTW
      KWOXRE = KILO*WOXRES                                               PRINTW
      KWPOWR = KILO*WPOWRS                                               PRINTW
      KWOILR = KILO*WOILRS                                               PRINTW
      KWACRE = KILO*WACRES                                               PRINTW
      KWWET  = KILO*WWET                                                 PRINTW
      KWLOSS = KILO*WLOSS                                                PRINTW
      FROST=KILO*WFROST
      KWFULO = KILO*WFULOS                                               PRINTW
      KWOXLO = KILO*WOXLOS                                               PRINTW
      KFUTK2=KILO*WFUTK2                                                 PRINTW
      KOXTK2=KILO*WOXTK2                                                 PRINTW
      KWPOWF = KILO*WPOWFO                                               PRINTW
      KWOIL  = KILO*WOIL                                                 PRINTW
      KWDECA = KILO*WDECAY                                               PRINTW
      KWFUOX = KILO*WFUOX                                                PRINTW
      KWFUL  = KILO*WFUL                                                 PRINTW
      KWOXID = KILO*WOXID                                                PRINTW
      KWFU2 = KILO * WFU2(1)                                             PRINTW
      KWOX2 = KILO * WOX2(1)                                             PRINTW
      KWORSU = KILO*WORSUL                                               PRINTW
      KWACST = KILO*WACSTK                                               PRINTW
      KWPREI = KILO*WPREIG                                               PRINTW
      KWINFU = KILO * WINFUT                                             PRINTW
      KWINOX =KILO*WINOXT                                                PRINTW
      KWTHRS =KILO*WTHRST                                                PRINTW
      KWENG2 =KILO*WENGS2                                                PRINTW
      KWPOWC =KILO*WPOWCD                                                PRINTW
      KWACRE =KILO*WACRES                                                PRINTW
      WRITE(6,66)                                                        PRINTW
   66 FORMAT (1H1)                                                       PRINTW
      CALL DATE                                                          PRINTW
   67 CONTINUE                                                           PRINTW
      IF(JUMP.EQ.1) GO TO 45                                             PRINTW
      WRITE(6,25)                                                        PRINTW
   25 FORMAT (1H0,32HWEIGHT BREAKDOWN - ORBITAL STAGE,33X6HPOUNDS,20X    PRINTW
     *  9HKILOGRAMS)                                                     PRINTW
      GO TO 50                                                           PRINTW
   45 WRITE (6,26)                                                       PRINTW
   26 FORMAT (1H0,31HWEIGHT BREAKDOWN - BOOST STAGE ,33X6HPOUNDS,20X     PRINTW
     *  9HKILOGRAMS)                                                     PRINTW
   50 WRITE(6,100) WSURF,KWSURF                                          PRINTW
  150 WRITE(6,200) WWING,KWWING                                          PRINTW
250   WRITE (6,13500) WHORZ,KWHORZ                                       PRINTW
  350 WRITE(6,400)WVERT,KWVERT                                           PRINTW
  650 WRITE(6,700)WFAIR,KWFAIR                                           PRINTW
  750 WRITE(6,800)WBODY,KWBODY                                           PRINTW
      WRITE(6,900) WINFUT,KWINFU                                         WDH1
      WRITE(6,1000) WINOXT,KWINOX                                        WDH1
1050  WRITE(6,1100)WBASIC,KWBASI                                         PRINTW
      WRITE(6,1300) WSECST,KWSECS                                        WDH1
1350  WRITE (6,1400) WTHRST,KWTHRS                                       PRINTW
 1550 WRITE(6,1600) WTPS,KWTPS                                           PRINTW
 1750 WRITE(6,1800) WCOVER,KWCOVE                                        PRINTW
 1850 WRITE(6,1900) WINSUL,KWINSU                                        PRINTW
 2150 WRITE(6,2200)WLRD,KWLRD                                            PRINTW
 2250 WRITE(6,2300)WLANCH ,KWLANC                                        PRINTW
 2350 WRITE(6,2400)   WDPLOY,KWDPLO                                      PRINTW
 2450 WRITE(6,2500)   WLG,KWLG                                           PRINTW
 2550 WRITE(6,2600) WDOCK,KWDOCK                                         PRINTW
 2750 WRITE(6,2800) WPROP,KWPROP                                         PRINTW
 2850 WRITE(6,2900) WENGS,KWENGS                                         PRINTW
      WRITE(6,2870) WENGS2,KWENG2                                        WDH1
      WRITE(6,3100) WNACEL,KWNACE                                        WDH1
      WRITE(6,3300) WFUTK,KWFUTK                                         WDH2
      WRITE(6,3400) WOXTK,KWOXTK                                         WDH2
      WRITE(6,3410) WFUTK2,KFUTK2                                        WDH2
      WRITE(6,3420) WOXTK2,KOXTK2                                        WDH2
      WRITE(6,3500) WINSTK,KWINST                                        WDH2
 3550 WRITE(6,3600) WFUSYS,KWFUSY                                        PRINTW
      WRITE(6,3700) WOXSYS,KWOXSY                                        WDH2
      WRITE(6,3800) WPRSYS,KWPRSY                                        WDH2
      WRITE(6,4110) WABPR,KWABPR                                         WDH2
      WRITE(6,3100) WNACEL,KWNACE
      WRITE(6,4115) WABFTK,KWABFT                                        WDH2
 4250 WRITE(6,4300)WORSUL,KWORSU                                         PRINTW
 4350 WRITE(6,4400)  WAUXT,KWAUXT                                        PRINTW
      WRITE(6,4470) WSTAB,KWSTAB                                         WDH2
4450  WRITE(6,4500)  WAERO,KWAERO                                        PRINTW
 4550 WRITE(6,4600) WACS,KWACS                                           PRINTW
      WRITE(6,4800) WACSTK,KWACST                                        WDH2
 4850 WRITE(6,4900)WPOWER,KWPOWE                                         PRINTW
4950  WRITE(6,5000) WSORCE,KWSORC                                        PRINTW
      WRITE(6,5300) WPOWTK,KWPOWT                                        WDH2
5350  WRITE (6,5400)WPOWCD,KWPOWC                                        PRINTW
 5550 WRITE(6,5600)WHYCAD,KWHYCA                                         PRINTW
 5650 WRITE(6,5700) WGNAV,KWGNAV                                         PRINTW
 5750 WRITE(6,5800) WINST,KWINS1                                         PRINTW
 5850 WRITE(6,5900) WCOMM,KWCOMM                                         PRINTW
 6550 WRITE(6,6600)WPPROV,KWPPRO                                         PRINTW
 7250 WRITE(6,7300) WDRY,KWDRY                                           PRINTW
      WRITE(6,7400) WCONT,KWCONT                                         WDH2
7450  WRITE(6,7500) WPERS,KWPERS                                         PRINTW
 7750 WRITE(6,7800) WPAYL ,KWPAYL                                        PRINTW
 7851 WRITE (6,7900) WPASS, KWPASS                                       PRINTW
      WRITE (6,7860) WCARGO, KWCARG                                      PRINTW
 8350 WRITE(6,8400)WRESID,KWRESI                                         PRINTW
      WRITE(6,8500) WGASPR,KWGASP                                        WDH2
 8550 WRITE(6,8600)WFUTRP,KWFUTR                                         PRINTW
      WRITE(6,8700) WOXTRP,KWOXTR                                        WDH2
 8850 WRITE(6,8900)WSRTRP,KWSRTR                                         PRINTW
 8950 WRITE(6,9000)WRESRV,KWRESR                                         PRINTW
 9050 WRITE(6,9100)WFURES,KWFURE                                         PRINTW
      WRITE(6,9200) WOXRES,KWOXRE                                        WDH2
      WRITE(6,9300) WPOWRS,KWPOWR                                        WDH2
      WRITE(6,9400) WOILRS,KWOILR                                        WDH2
      WRITE(6,9500) WACRES,KWACRE                                        WDH2
 9650 WRITE(6,9700)WWET,KWWET                                            PRINTW
 9750 WRITE(6,9800)WLOSS,KWLOSS                                          PRINTW
      WRITE(6,9898) WFROST,FROST
 9850 WRITE(6,9900)WFULOS,KWFULO                                         PRINTW
 9950 WRITE(6,10000)WOXLOS,KWOXLO                                        PRINTW
10050 WRITE(6,10100)WPOWFO,KWPOWF                                        PRINTW
10150 WRITE(6,10200)  WACSFO,KWACSF                                      PRINTW
      WRITE(6,10400) WOIL,KWOIL                                          WDH2
      WRITE(6,10410) WABFU,KWABFU                                        WDH2
      WRITE(6,10600)WDECAY,KWDECA                                        WDH2
10650 WRITE(6,10700)WFUOX,KWFUOX                                         PRINTW
10750 WRITE(6,10800)WFUL,KWFUL                                           PRINTW
      WRITE(6,11400) WOXID,KWOXID                                        WDH2
      WRITE(6,11500)WFU2(1),KWFU2                                        WDH2
      WRITE(6,11600)WOX2(1),KWOX2                                        WDH2
      WRITE(6,11900)WTO,KWTO                                             WDH2
      WRITE(6,12300) WPREIG,KWPREI                                       WDH2
      WRITE(6,12500) WGROSS,KWGROS                                       WDH2
      IF(JUMP.EQ.0) GO TO 9999                                           PRINTW
      WBOO = WGROSS - WPASS                                              PRINTW
      KWBOO = WBOO * KILO                                                PRINTW
      WRITE(6,13010) WBOO , KWBOO                                        PRINTW
 9999 CONTINUE                                                           PRINTW
      RETURN                                                             PRINTW
100   FORMAT(1H0,52HAERODYNAMIC SURFACES                                 PRINTW
     *F18.0,F27.0   )                                                    PRINTW
  200 FORMAT(1H ,52H    WING + WING MOUNTED CONTROL SURFACES             PRINTW
     *F9.0,F27.0)                                                        PRINTW
  400 FORMAT(1H ,52H    VERTICAL SURFACES                                PRINTW
     *F9.0,F27.0)                                                        PRINTW
  700 FORMAT(1H ,52H    FAIRINGS,SHROUDS AND ASSOCIATED STRUCTURE        PRINTW
     *F9.0,F27.0)                                                        PRINTW
  800 FORMAT(1H0,52HBODY STRUCTURE                                       PRINTW
     *F18.0,F27.0   )                                                    PRINTW
  900 FORMAT (1H ,50H    STRUCTURAL FUEL CONTAINERS                      PRINTW
     *F11.0,F27.0)                                                       PRINTW
 1000 FORMAT (1H  50H    STRUCTURAL OXIDIZER CONTAINERS                  PRINTW
     *F11.0,F27.0)                                                       PRINTW
1100  FORMAT(1H ,52H    BASIC BODY STRUCTURE                             PRINTW
     *F9.0,F27.0)                                                        PRINTW
 1300 FORMAT(1H ,52H    SECONDARY STRUCTURE                              PRINTW
     *F9.0,F27.0)                                                        PRINTW
 1400 FORMAT(1H ,52H    THRUST STRUCTURE                                 PRINTW
     *F9.0,F27.0)                                                        PRINTW
 1600 FORMAT(1H0,52HINDUCED ENVIRONMENTAL PROTECTION                     PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 1800 FORMAT(1H ,52H    COVER PANELS,NON-STRUCTURAL                      PRINTW
     *F9.0,F27.0)                                                        PRINTW
1900  FORMAT(1H ,52H    VEHICLE INSULATION                               PRINTW
     *F9.0,F27.0)                                                        PRINTW
 2200 FORMAT(1H0,52HLAUNCH,RECOVERY AND DOCKING                          PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 2300 FORMAT(1H ,52H    LAUNCH GEAR                                      PRINTW
     *F9.0,F27.0)                                                        PRINTW
 2400 FORMAT(1H ,52H    DEPLOYABLE AERODYNAMIC DEVICES                   PRINTW
     *F9.0,F27.0)                                                        PRINTW
2500  FORMAT(1H ,52H    ALIGHTING GEAR                                   PRINTW
     *F9.0,F27.0)                                                        PRINTW
 2600 FORMAT(1H ,52H    DOCKING STRUCTURE                                PRINTW
     *F9.0,F27.0)                                                        PRINTW
 2800 FORMAT(1H0,52HPROPULSION                                           PRINTW
     *F18.0,F27.0   )                                                    PRINTW
2870  FORMAT(1H ,52H    SECONDARY ENGINES AND ACCESSORIES                PRINTW
     *F9.0,F27.0)                                                        PRINTW
 2900 FORMAT(1H ,52H    ENGINES AND ACCESSORIES                          PRINTW
     *F9.0,F27.0)                                                        PRINTW
 3100 FORMAT(1H ,52H    NACELLES,PODS,PYLONS,SUPPORTS                    PRINTW
     *F9.0,F27.0)                                                        PRINTW
 3300 FORMAT(1H ,52H    FUEL CONTAINERS AND SUPPORTS (NON-STRUCTURAL)    JDA9
     *F9.0,F27.0)                                                        PRINTW
 3400 FORMAT(1H ,52H    OXIDIZER CONTAINERS AND SUPPORTS(NON-STRUCTURAL) JDA9
     *F9.0,F27.0)                                                        PRINTW
3410  FORMAT(1H ,52H    SECONDARY FUEL TANKAGE AND SYSTEMS               PRINTW
     *  F9.0,F27.0)                                                      PRINTW
3420  FORMAT(1H ,52H    SECONDARY OXIDIZER TANKAGE AND SYSTEMS           PRINTW
     *   F9.0,F27.0)                                                     PRINTW
 3500 FORMAT(1H ,52H    PROPELLANT INSULATION                            PRINTW
     *F9.0,F27.0)                                                        PRINTW
 3600 FORMAT(1H ,52H    FUEL SYSTEM - MAIN                               PRINTW
     *F9.0,F27.0)                                                        PRINTW
 3700 FORMAT(1H ,52H    OXIDIZER SYSTEM - MAIN                           PRINTW
     *F9.0,F27.0)                                                        PRINTW
3800  FORMAT(1H ,52H    PURGE SYSTEMS                                    PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4110 FORMAT(1H ,52H    AIRBREATHING ENGINES AND INSTALLATION            PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4115 FORMAT(1H ,52H    AIRBREATHING PROPULSION TANKAGE AND SYSTEMS      PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4300 FORMAT(1H0,52HORIENTATION,SEPARATION AND ULLAGE CONTROL            PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 4400 FORMAT(1H ,52H    SEPARATION SYSTEMS                               PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4470 FORMAT(1H ,52H    STABILITY AND CONTROL, ENGINE GIMBAL             PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4500 FORMAT(1H ,52H    AERODYNAMIC CONTROLS                             PRINTW
     *F9.0,F27.0)                                                        PRINTW
4600  FORMAT(1H ,52H    SPATIAL ATTITUDE CONTROL SYSTEM                  PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4800 FORMAT(1H ,52H    CONTROL PROPELLANT TANKAGE AND SYSTEMS           PRINTW
     *F9.0,F27.0)                                                        PRINTW
 4900 FORMAT(1H0,52HPRIME POWER SOURCE AND DISTRIBUTION                  WDH4
     *F18.0,F27.0   )                                                    PRINTW
5000  FORMAT(1H ,52H    POWER SOURCE UNITS                               PRINTW
     *F9.0,F27.0)                                                        PRINTW
 5300 FORMAT(1H ,52H    POWER SOURCE TANKAGE AND SYSTEMS                 PRINTW
     *F9.0,F27.0)                                                        PRINTW
 5400 FORMAT(1H0,52HPOWER CONVERSION AND DISTRIBUTION                    PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 5600 FORMAT(1H ,52H    HYDRAULIC/PNEUMATIC                              PRINTW
     *F9.0,F27.0)                                                        PRINTW
 5700 FORMAT(1H0,52HGUIDANCE AND NAVIGATION                              PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 5800 FORMAT(1H0,52HINSTRUMENTATION                                      PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 5900 FORMAT(1H0,52HCOMMUNICATION                                        PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 6600 FORMAT(1H0,52HPERSONNEL PROVISIONS                                 PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 7300 FORMAT(1H0,52HDRY STRUCTURE                                        PRINTW
     *, 7X,1H(,F10.0,1H),17X,1H(,F10.0,1H)       )                       PRINTW
7400  FORMAT(1H0,52HDESIGN RESERVE (CONTINGENCY)                         PRINTW
     *F18.0,F27.0   )                                                    PRINTW
7500  FORMAT(1H0,52HPERSONNEL                                            PRINTW
     *  F18.0,F27.0)                                                     PRINTW
 7800 FORMAT(1H0,52HPAYLOAD                                              PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 7860 FORMAT(1H ,52H    MISSION EQUIPMENT/PAYLOAD                        PRINTW
     *F9.0,F27.0)                                                        PRINTW
 7900 FORMAT(1H ,52H    CARGO OR UPPER STAGE                             PRINTW
     *F9.0,F27.0)                                                        PRINTW
 8400 FORMAT(1H0,52HRESIDUAL PROPELLANT AND SERVICE ITEMS                PRINTW
     *F18.0,F27.0   )                                                    PRINTW
8500  FORMAT(1H ,52H    TANK PRESSURIZATION AND PURGE GASES              PRINTW
     *F9.0,F27.0)                                                        PRINTW
8600  FORMAT(1H ,52H    TRAPPED FUEL                                     PRINTW
     *F9.0,F27.0)                                                        PRINTW
8700  FORMAT(1H ,52H    TRAPPED OXIDIZER                                 PRINTW
     *F9.0,F27.0)                                                        PRINTW
 8900 FORMAT(1H ,52H    SERVICE ITEMS RESIDUALS                          PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9000 FORMAT(1H0,52HRESERVE PROPELLANT AND SERVICE ITEMS                 PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 9100 FORMAT(1H ,52H    FUEL-MAIN PROPULSION                             PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9200 FORMAT(1H ,52H    OXIDIZER-MAIN PROPULSION                         PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9300 FORMAT(1H ,52H    POWER SOURCE PROPELLANTS                         PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9400 FORMAT(1H ,52H    LUBRICANTS                                       PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9500 FORMAT(1H ,52H    ATTITUDE CONTROL PROPELLANTS                     PRINTW
     *F9.0,F27.0)                                                        PRINTW
 9700 FORMAT(1H0,52HOPERATING WEIGHT EMPTY                               WDH1
     *, 7X,1H(,F10.0,1H),17X,1H(,F10.0,1H)       )                       PRINTW
 9800 FORMAT(1H0,52HIN-FLIGHT LOSSES                                     PRINTW
     *F18.0,F27.0   )                                                    PRINTW
 9898 FORMAT(1H ,52H    ICE AND FROST
     *F9.0,F27.0)
9900  FORMAT(1H ,52H    FUEL VENTED                                      PRINTW
     *F9.0,F27.0)                                                        PRINTW
10000 FORMAT(1H ,52H    OXIDIZER VENTED                                  PRINTW
     *F9.0,F27.0)                                                        PRINTW
10100 FORMAT(1H ,52H    POWER SOURCE PROPELLANTS                         PRINTW
     *F9.0,F27.0)                                                        PRINTW
10200 FORMAT(1H ,52H    ATTITUDE CONTROL PROPELLANTS                     PRINTW
     *F9.0,F27.0)                                                        PRINTW
10400 FORMAT(1H ,52H    LUBRICANTS AND OTHER SERVICE ITEMS               PRINTW
     *F9.0,F27.0)                                                        PRINTW
10410 FORMAT(1H ,52H    FLYBACK FUEL                                     PRINTW
     *F9.0,F27.0)                                                        PRINTW
10600 FORMAT(1H0,52HTHRUST DECAY PROPELLANTS                             PRINTW
     *F18.0,F27.0   )                                                    PRINTW
10700 FORMAT(1H0,52HPROPELLANTS                                          PRINTW
     *F18.0,F27.0   )                                                    PRINTW
10800 FORMAT(1H ,52H    FUEL - MAIN                                      PRINTW
     *F9.0,F27.0)                                                        PRINTW
11400 FORMAT(1H ,52H    OXIDIZER - MAIN                                  PRINTW
     *F9.0,F27.0)                                                        PRINTW
11500 FORMAT(1H ,52H    FUEL - SECONDARY                                 PRINTW
     *F9.0,F27.0)                                                        PRINTW
11600 FORMAT(1H ,52H    OXIDIZER - SECONDARY                             PRINTW
     *F9.0,F27.0)                                                        PRINTW
11900 FORMAT(1H0,52HMASS AT FULL THRUST                                  PRINTW
     *F18.0,F27.0   )                                                    PRINTW
12300 FORMAT(1H0,52HPRE-IGNITION LOSSES                                  PRINTW
     *F18.0,F27.0   )                                                    PRINTW
12500 FORMAT(1H0,52HMAXIMUM GROSS WEIGHT                                 PRINTW
     *, 7X,1H(,F10.0,1H),15X,1H(,F10.0,1H)       )                       PRINTW
13010 FORMAT(1H0,50HGROSS WEIGHT OF ONE BOOSTER                          PRINTW
     *  2XF18.0,F27.0)                                                   PRINTW
13500 FORMAT(1H ,52H    HORIZONTAL SURFACES                              WDH4
     * F9.0,F27.0)                                                       PRINTW
      END                                                                PRINTW



  ELT SET0,1,710309, 47528
  EOF "                                                                        "
      SUBROUTINE SET0                                                    SET0
      COMMON/CINPUT/A(392)                                               WDH3
      COMMON/VOLCAL/D(37)                                                WDH3
      COMMON/WTCALC/C(134)
      DO 10 I=1,392                                                      WDH3
   10 A(I)=0                                                             SET0
      DO 30 I=1,134
   30 C(I)=0                                                             SET0
      DO 40 I=1,37                                                       WDH3
   40 D(I)=0                                                             SET0
      RETURN                                                             SET0
      END                                                                SET0
